.u *#ifdef VERTEX #version 300 es #define HLSLCC_ENABLE_UNIFORM_BUFFERS 1 #if HLSLCC_ENABLE_UNIFORM_BUFFERS #define UNITY_UNIFORM #else #define UNITY_UNIFORM uniform #endif #define UNITY_SUPPORTS_UNIFORM_LOCATION 1 #if UNITY_SUPPORTS_UNIFORM_LOCATION #define UNITY_LOCATION(x) layout(location = x) #define UNITY_BINDING(x) layout(binding = x, std140) #else #define UNITY_LOCATION(x) #define UNITY_BINDING(x) layout(std140) #endif uniform vec4 hlslcc_mtx4x4unity_MatrixVP[4]; uniform mediump vec4 _LightLookup_TexelSize; uniform vec4 hlslcc_mtx4x4L2DInvMatrix[4]; uniform vec4 L2DColor; uniform float L2DFalloffIntensity; uniform float L2DFalloffDistance; uniform int L2DLightType; uniform mediump float _InverseHDREmulationScale; #if HLSLCC_ENABLE_UNIFORM_BUFFERS UNITY_BINDING(0) uniform UnityPerDraw { #endif UNITY_UNIFORM vec4 hlslcc_mtx4x4unity_ObjectToWorld[4]; UNITY_UNIFORM vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_WorldToObject[4]; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_LODFade; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_WorldTransformParams; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_RenderingLayer; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_LightData; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_LightIndices[2]; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_ProbesOcclusion; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_SpecCube0_HDR; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_SpecCube1_HDR; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_SpecCube0_BoxMax; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_SpecCube0_BoxMin; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_SpecCube0_ProbePosition; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_SpecCube1_BoxMax; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_SpecCube1_BoxMin; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_SpecCube1_ProbePosition; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_LightmapST; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_DynamicLightmapST; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_SHAr; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_SHAg; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_SHAb; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_SHBr; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_SHBg; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_SHBb; UNITY_UNIFORM mediump vec4 Xhlslcc_UnusedXunity_SHC; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_RendererBounds_Min; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_RendererBounds_Max; UNITY_UNIFORM vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_MatrixPreviousM[4]; UNITY_UNIFORM vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_MatrixPreviousMI[4]; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_MotionVectorsParams; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_SpriteColor; UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_SpriteProps; #if HLSLCC_ENABLE_UNIFORM_BUFFERS }; #endif in highp vec3 in_POSITION0; in highp vec4 in_COLOR0; in highp vec2 in_TEXCOORD0; out mediump vec4 vs_COLOR0; out mediump vec2 vs_TEXCOORD0; mediump vec4 phase0_Output0_2; out mediump vec2 vs_TEXCOORD1; highp vec2 vs_TEXCOORD2; highp vec4 vs_TEXCOORD5; vec4 u_xlat0; vec4 u_xlat1; vec2 u_xlat2; bool u_xlatb2; vec2 u_xlat3; mediump float u_xlat16_4; vec3 u_xlat5; void main() { switch(L2DLightType){ case 0: case 1: case 2: u_xlat0.xy = vec2(vec2(L2DFalloffDistance, L2DFalloffDistance)) * in_COLOR0.xy + in_POSITION0.xy; u_xlat1 = u_xlat0.yyyy * hlslcc_mtx4x4unity_ObjectToWorld[1]; u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[0] * u_xlat0.xxxx + u_xlat1; u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[2] * in_POSITION0.zzzz + u_xlat0; u_xlat0 = u_xlat0 + hlslcc_mtx4x4unity_ObjectToWorld[3]; u_xlat1 = u_xlat0.yyyy * hlslcc_mtx4x4unity_MatrixVP[1]; u_xlat1 = hlslcc_mtx4x4unity_MatrixVP[0] * u_xlat0.xxxx + u_xlat1; u_xlat1 = hlslcc_mtx4x4unity_MatrixVP[2] * u_xlat0.zzzz + u_xlat1; u_xlat0 = hlslcc_mtx4x4unity_MatrixVP[3] * u_xlat0.wwww + u_xlat1; u_xlat1.xyz = L2DColor.xyz * vec3(_InverseHDREmulationScale); u_xlatb2 = L2DLightType==2; u_xlat3.x = (u_xlatb2) ? in_TEXCOORD0.x : in_COLOR0.w; u_xlat3.y = (u_xlatb2) ? in_TEXCOORD0.y : L2DFalloffIntensity; u_xlat2.xy = u_xlat0.xy / u_xlat0.ww; vs_TEXCOORD2.xy = u_xlat2.xy * vec2(0.5, 0.5) + vec2(0.5, 0.5); gl_Position = u_xlat0; u_xlat1.w = in_COLOR0.w; vs_COLOR0 = u_xlat1; phase0_Output0_2.xy = u_xlat3.xy; phase0_Output0_2.zw = vec2(0.0, 0.0); vs_TEXCOORD5 = in_COLOR0; vs_TEXCOORD0 = phase0_Output0_2.xy; vs_TEXCOORD1 = phase0_Output0_2.zw; return; case 3: u_xlat0 = in_POSITION0.yyyy * hlslcc_mtx4x4unity_ObjectToWorld[1]; u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[0] * in_POSITION0.xxxx + u_xlat0; u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[2] * in_POSITION0.zzzz + u_xlat0; u_xlat0 = u_xlat0 + hlslcc_mtx4x4unity_ObjectToWorld[3]; u_xlat1 = u_xlat0.yyyy * hlslcc_mtx4x4unity_MatrixVP[1]; u_xlat1 = hlslcc_mtx4x4unity_MatrixVP[0] * u_xlat0.xxxx + u_xlat1; u_xlat1 = hlslcc_mtx4x4unity_MatrixVP[2] * u_xlat0.zzzz + u_xlat1; u_xlat1 = hlslcc_mtx4x4unity_MatrixVP[3] * u_xlat0.wwww + u_xlat1; u_xlat5.xz = u_xlat0.yy * hlslcc_mtx4x4L2DInvMatrix[1].xy; u_xlat0.xy = hlslcc_mtx4x4L2DInvMatrix[0].xy * u_xlat0.xx + u_xlat5.xz; u_xlat0.xy = hlslcc_mtx4x4L2DInvMatrix[2].xy * u_xlat0.zz + u_xlat0.xy; u_xlat0.xy = u_xlat0.xy + hlslcc_mtx4x4L2DInvMatrix[3].xy; u_xlat16_4 = _LightLookup_TexelSize.x * 0.5; u_xlat0.xy = u_xlat0.xy + vec2(1.0, 1.0); u_xlat0.zw = u_xlat0.xy * vec2(0.5, 0.5) + vec2(u_xlat16_4); u_xlat2.xy = u_xlat1.xy / u_xlat1.ww; vs_TEXCOORD2.xy = u_xlat2.xy * vec2(0.5, 0.5) + vec2(0.5, 0.5); gl_Position = u_xlat1; vs_COLOR0 = vec4(0.0, 0.0, 0.0, 0.0); u_xlat0.xy = in_TEXCOORD0.xy; phase0_Output0_2 = u_xlat0; vs_TEXCOORD5 = in_COLOR0; vs_TEXCOORD0 = phase0_Output0_2.xy; vs_TEXCOORD1 = phase0_Output0_2.zw; return; default: break; } gl_Position = vec4(0.0, 0.0, 0.0, 0.0); vs_COLOR0 = vec4(0.0, 0.0, 0.0, 0.0); phase0_Output0_2 = vec4(0.0, 0.0, 0.0, 0.0); vs_TEXCOORD5 = vec4(0.0, 0.0, 0.0, 0.0); vs_TEXCOORD2.xy = vec2(0.0, 0.0); vs_TEXCOORD0 = phase0_Output0_2.xy; vs_TEXCOORD1 = phase0_Output0_2.zw; return; } #endif #ifdef FRAGMENT #version 300 es precision highp float; precision highp int; #define HLSLCC_ENABLE_UNIFORM_BUFFERS 1 #if HLSLCC_ENABLE_UNIFORM_BUFFERS #define UNITY_UNIFORM #else #define UNITY_UNIFORM uniform #endif #define UNITY_SUPPORTS_UNIFORM_LOCATION 1 #if UNITY_SUPPORTS_UNIFORM_LOCATION #define UNITY_LOCATION(x) layout(location = x) #define UNITY_BINDING(x) layout(binding = x, std140) #else #define UNITY_LOCATION(x) #define UNITY_BINDING(x) layout(std140) #endif uniform vec2 _GlobalMipBias; uniform vec4 L2DColor; uniform float L2DFalloffIntensity; uniform float L2DOuterAngle; uniform float L2DInnerAngle; uniform float L2DInnerRadiusMult; uniform int L2DLightType; uniform mediump float _InverseHDREmulationScale; UNITY_LOCATION(0) uniform mediump sampler2D _CookieTex; UNITY_LOCATION(1) uniform mediump sampler2D _FalloffLookup; UNITY_LOCATION(2) uniform mediump sampler2D _LightLookup; in mediump vec4 vs_COLOR0; in mediump vec2 vs_TEXCOORD0; in mediump vec2 vs_TEXCOORD1; layout(location = 0) out mediump vec4 SV_Target0; float u_xlat0; mediump vec4 u_xlat16_0; bool u_xlatb0; vec2 u_xlat1; mediump float u_xlat16_1; float u_xlat2; float u_xlat4; bool u_xlatb4; void main() { switch(L2DLightType){ case 0: case 1: case 2: u_xlatb0 = L2DLightType==2; if(u_xlatb0){ u_xlat16_0 = texture(_CookieTex, vs_TEXCOORD0.xy, _GlobalMipBias.x); SV_Target0 = u_xlat16_0 * vs_COLOR0; } else { u_xlat16_0.x = texture(_FalloffLookup, vs_TEXCOORD0.xy, _GlobalMipBias.x).x; SV_Target0.xyz = vs_COLOR0.xyz; SV_Target0.w = u_xlat16_0.x; } return; case 3: u_xlat16_0.xy = texture(_LightLookup, vs_TEXCOORD1.xy, _GlobalMipBias.x).xy; u_xlat0 = u_xlat16_0.x * L2DInnerRadiusMult; u_xlat0 = clamp(u_xlat0, 0.0, 1.0); u_xlatb4 = L2DInnerAngle==1.0; u_xlat16_1 = (u_xlatb4) ? 1.0 : 0.0; u_xlat2 = (-u_xlat16_0.y) + L2DOuterAngle; u_xlat2 = u_xlat16_1 + u_xlat2; u_xlat4 = (-L2DInnerAngle) + L2DOuterAngle; u_xlat4 = float(1.0) / u_xlat4; u_xlat2 = u_xlat4 * u_xlat2; u_xlat2 = clamp(u_xlat2, 0.0, 1.0); u_xlat16_1 = u_xlat2 * u_xlat0; u_xlat1.x = u_xlat16_1; u_xlat1.y = L2DFalloffIntensity; u_xlat16_0.x = texture(_FalloffLookup, u_xlat1.xy, _GlobalMipBias.x).x; SV_Target0.xyz = L2DColor.xyz * vec3(_InverseHDREmulationScale); SV_Target0.w = u_xlat16_0.x * _InverseHDREmulationScale; return; default: break; } SV_Target0 = vs_COLOR0; return; } #endif $Globals8_GlobalMipBiasL2DColorL2DFalloffIntensity L2DOuterAngle$ L2DInnerAngle(L2DInnerRadiusMult, L2DLightType0_InverseHDREmulationScale4_LightLookup_TexelSize@L2DColorL2DFalloffIntensityL2DFalloffDistance L2DLightType_InverseHDREmulationScale L2DInvMatrixP UnityPerDrawunity_ObjectToWorld _CookieTex_FalloffLookup _LightLookup$Globals UnityPerDraw