// ---- Created with 3Dmigoto v1.2.39 on Sun Jun 12 00:07:19 2016

cbuffer _Globals : register(b0)
{
  float4x4 LocalToWorld : packoffset(c0);
  float4x4 ScreenToWorldMatrix : packoffset(c4);
  bool bDecompressSceneColor : packoffset(c8);
  float4 PackedParameters : packoffset(c9);
  float4 MinMaxBlurClamp : packoffset(c10);
  float4 LightColorAndFalloffExponent : packoffset(c11);
  float3 DistanceFieldParameters : packoffset(c12);
  float4x4 ScreenToShadowMatrix : packoffset(c13);
  float4 ShadowBufferAndTexelSize : packoffset(c17);
  float ShadowOverrideFactor : packoffset(c18);
  float SSSMultiplier : packoffset(c18.y);
  bool bReceiveDynamicShadows : packoffset(c18.z);
  bool bEnableDistanceShadowFading : packoffset(c18.w);
  float2 DistanceFadeParameters : packoffset(c19);
  float4 IBLPositionAndWeight0 : packoffset(c20);
  float4 IBLPositionAndWeight1 : packoffset(c21);
  float4 IBLPositionAndWeight2 : packoffset(c22);
  float4 IBLPositionAndWeight3 : packoffset(c23);
  float4x4 IBLProxyOBB0 : packoffset(c24);
  float4x4 IBLProxyOBB1 : packoffset(c28);
  float4x4 IBLProxyOBB2 : packoffset(c32);
  float4 IBLUseProxyVolume : packoffset(c36);
  float4x4 IBLLastProxyOBB0 : packoffset(c37);
  float4x4 IBLLastProxyOBB1 : packoffset(c41);
  float4x4 IBLLastProxyOBB2 : packoffset(c45);
  float4 IBLUseLastProxyVolume : packoffset(c49);
  float ForcedIBLWeight : packoffset(c50);
  float AdditionalReflections : packoffset(c50.y);
  float4x4 InvViewProjectionMatrix : packoffset(c51);
  float3 CameraWorldPos : packoffset(c55);
  float3 ActorWorldPos : packoffset(c56);
  float4 ObjectWorldPositionAndRadius : packoffset(c57);
  float3 ObjectOrientation : packoffset(c58);
  float3 ObjectPostProjectionPosition : packoffset(c59);
  float3 ObjectNDCPosition : packoffset(c60);
  float4 ObjectMacroUVScales : packoffset(c61);
  float3 FoliageImpulseDirection : packoffset(c62);
  float4 FoliageNormalizedRotationAxisAndAngle : packoffset(c63);
  float4 WindDirectionAndSpeed : packoffset(c64);
  float3x3 LocalToWorldMatrix : packoffset(c65);
  float3x3 WorldToLocalMatrix : packoffset(c68);
  float3x3 WorldToViewMatrix : packoffset(c71);
  float3x3 ViewToWorldMatrix : packoffset(c74);
  float4 UniformPixelVector_0 : packoffset(c77);
  float4 UniformPixelVector_1 : packoffset(c78);
  float4 UniformPixelVector_2 : packoffset(c79);
  float4 UniformPixelVector_3 : packoffset(c80);
  float4 UniformPixelVector_4 : packoffset(c81);
  float4 UniformPixelVector_5 : packoffset(c82);
  float4 UniformPixelVector_6 : packoffset(c83);
  float4 UniformPixelVector_7 : packoffset(c84);
  float4 UniformPixelVector_8 : packoffset(c85);
  float4 UniformPixelVector_9 : packoffset(c86);
  float4 UniformPixelVector_10 : packoffset(c87);
  float4 UniformPixelVector_11 : packoffset(c88);
  float4 UniformPixelVector_12 : packoffset(c89);
  float4 UniformPixelScalars_0 : packoffset(c90);
  float4 UniformPixelScalars_1 : packoffset(c91);
  float4 UniformPixelScalars_2 : packoffset(c92);
  float4 UniformPixelScalars_3 : packoffset(c93);
  float4 UniformPixelScalars_4 : packoffset(c94);
  float4 UniformPixelScalars_5 : packoffset(c95);
  float4 UniformPixelScalars_6 : packoffset(c96);
  float3 TemporalAAParameters : packoffset(c97);
  float4x4 PreviousLocalToWorld : packoffset(c98);
  float LocalToWorldRotDeterminantFlip : packoffset(c102);
  float3x3 WorldToLocal : packoffset(c103);
  float4 LightmapCoordinateScaleBias : packoffset(c106);
  float4 ShadowmapCoordinateScaleBias : packoffset(c107);
  float SubSurfaceQuality : packoffset(c108);
  float4 DeferredRenderingParameters : packoffset(c109);
  float2 TemporalAAParametersPS : packoffset(c110);
  float3 SpotDirection : packoffset(c111);
  float2 SpotAngles : packoffset(c112);
  float3 UpperSkyColor : packoffset(c113);
  float3 LowerSkyColor : packoffset(c114);
  float UseOnlyLightMapSpecular : packoffset(c114.w);
  float4 AmbientColorAndSkyFactor : packoffset(c115);
  float4 LightMapScale[2] : packoffset(c116);
  float EmissiveMultiplier : packoffset(c118);
  float DiffuseMultiplier : packoffset(c118.y);
}

cbuffer PSOffsetConstants : register(b2)
{
  float4 ScreenPositionScaleBias : packoffset(c0);
  float4 MinZ_MaxZRatio : packoffset(c1);
  float NvStereoEnabled : packoffset(c2);
  float4 DiffuseOverrideParameter : packoffset(c3);
  float4 SpecularOverrideParameter : packoffset(c4);
  float4 CameraPositionPS : packoffset(c5);
  float4 ScreenAndTexelSize : packoffset(c6);
}

SamplerState LightMapTexturesSampler_0__s : register(s0);
SamplerState LightMapTexturesSampler_1__s : register(s1);
SamplerState AmbientReflectionCubemapSampler_s : register(s2);
SamplerState ForcedIBLCubemapSampler_s : register(s3);
SamplerState PixelTexture2D_0Sampler_s : register(s4);
SamplerState PixelTexture2D_1Sampler_s : register(s5);
SamplerState PixelTexture2D_2Sampler_s : register(s6);
SamplerState PixelTexture2D_3Sampler_s : register(s7);
SamplerState PixelTexture2D_4Sampler_s : register(s8);
TextureCube<float4> AmbientReflectionCubemap : register(t0);
TextureCube<float4> ForcedIBLCubemap : register(t1);
Texture2D<float4> PixelTexture2D_0 : register(t2);
Texture2D<float4> PixelTexture2D_1 : register(t3);
Texture2D<float4> PixelTexture2D_2 : register(t4);
Texture2D<float4> PixelTexture2D_3 : register(t5);
Texture2D<float4> PixelTexture2D_4 : register(t6);
Texture2D<float4> LightMapTextures_0_ : register(t7);
Texture2D<float4> LightMapTextures_1_ : register(t8);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main( 
  linear centroid float4 v0 : TEXCOORD10,
  linear centroid float4 v1 : TEXCOORD11,
  float4 v2 : COLOR0,
  float4 v3 : TEXCOORD0,
  float4 v4 : TEXCOORD1,
  float4 v5 : TEXCOORD6,
  float4 v6 : TEXCOORD7,
  float4 v7 : TEXCOORD5,
  uint v8 : SV_IsFrontFace0,
  out float4 o0 : SV_Target0,
  out float4 o1 : SV_Target1,
  out float4 o2 : SV_Target2,
  out float4 o3 : SV_Target3,
  out float4 o4 : SV_Target4,
  out float4 o5 : SV_Target5,
  out float4 o6 : SV_Target6)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = dot(v1.xyz, v1.xyz);
  r0.x = rsqrt(r0.x);
  r0.xyz = v1.xyz * r0.xxx;
  r0.w = dot(v0.xyz, v0.xyz);
  r0.w = rsqrt(r0.w);
  r1.xyz = v0.xyz * r0.www;
  r2.xyz = r1.yzx * r0.zxy;
  r2.xyz = r0.yzx * r1.zxy + -r2.xyz;
  r2.xyz = v1.www * r2.xyz;
  r3.xyz = CameraWorldPos.xyz + v7.xyz;
  r0.w = dot(v5.xyz, v5.xyz);
  r0.w = rsqrt(r0.w);
  r4.xyz = v5.xyz * r0.www;
  r5.xyz = PixelTexture2D_0.SampleBias(PixelTexture2D_0Sampler_s, v4.xy, 0).xyz;
  r5.xyz = r5.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r6.xy = UniformPixelVector_3.xy * v4.xy;
  r6.xyz = PixelTexture2D_1.SampleBias(PixelTexture2D_1Sampler_s, r6.xy, 0).xyz;
  r6.xyz = r6.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r6.xyz = UniformPixelVector_5.xyz * r6.xyz;
  r7.xy = UniformPixelVector_6.xy * v4.xy;
  r7.xyz = PixelTexture2D_2.SampleBias(PixelTexture2D_2Sampler_s, r7.xy, 0).xyz;
  r7.xyz = r7.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r8.xy = PixelTexture2D_3.SampleBias(PixelTexture2D_3Sampler_s, v4.xy, 0).xy;
  r0.w = saturate(UniformPixelScalars_1.w * r8.x);
  r1.w = cmp(r0.w < 9.99999997e-007);
  r0.w = log2(r0.w);
  r0.w = UniformPixelScalars_2.x * r0.w;
  r0.w = exp2(r0.w);
  r0.w = r1.w ? 0 : r0.w;
  r7.xyz = r7.xyz * UniformPixelVector_8.xyz + -r6.xyz;
  r6.xyz = r0.www * r7.xyz + r6.xyz;
  r1.w = saturate(UniformPixelScalars_2.y * r8.y);
  r2.w = cmp(r1.w < 9.99999997e-007);
  r1.w = log2(r1.w);
  r1.w = UniformPixelScalars_2.z * r1.w;
  r1.w = exp2(r1.w);
  r1.w = r2.w ? 0 : r1.w;
  r7.xyz = float3(0,0,9.99999975e-005) + -r6.xyz;
  r6.xyz = r1.www * r7.xyz + r6.xyz;
  r5.xyz = r5.xyz * UniformPixelVector_2.xyz + r6.xyz;
  r2.w = dot(r5.xyz, r5.xyz);
  r2.w = sqrt(r2.w);
  r5.xyz = r5.xyz / r2.www;
  r2.w = dot(r5.xyz, r5.xyz);
  r2.w = rsqrt(r2.w);
  r5.xyz = r5.xyz * r2.www;
  r6.xyz = float3(1,1,1) + -UniformPixelVector_0.xyz;
  r7.xyz = PixelTexture2D_4.SampleBias(PixelTexture2D_4Sampler_s, v4.xy, 0).xyz;
  r7.xyz = max(float3(9.99999997e-007,9.99999997e-007,9.99999997e-007), abs(r7.xyz));
  r7.xyz = log2(r7.xyz);
  r7.xyz = UniformPixelScalars_2.www * r7.xyz;
  r7.xyz = exp2(r7.xyz);
  r8.xyz = UniformPixelVector_10.xyz + -UniformPixelVector_9.xyz;
  r8.xyz = r0.www * r8.xyz + UniformPixelVector_9.xyz;
  r9.xyz = UniformPixelVector_11.xyz + -r8.xyz;
  r8.xyz = r1.www * r9.xyz + r8.xyz;
  r7.xyz = r8.xyz * r7.xyz;
  r6.xyz = r7.xyz * r6.xyz;
  r6.xyz = r6.xyz * DiffuseOverrideParameter.www + DiffuseOverrideParameter.xyz;
  r7.xyz = DiffuseMultiplier * r6.xyz;
  r2.w = UniformPixelScalars_3.x + -UniformPixelScalars_3.y;
  r2.w = r0.w * r2.w + UniformPixelScalars_3.y;
  r3.w = UniformPixelScalars_3.z + -r2.w;
  r2.w = r1.w * r3.w + r2.w;
  r8.xyz = r2.www * SpecularOverrideParameter.www + SpecularOverrideParameter.xyz;
  r9.xy = UniformPixelScalars_4.xx + -UniformPixelScalars_4.yw;
  r2.w = UniformPixelScalars_3.w * r9.x + UniformPixelScalars_4.y;
  r3.w = UniformPixelScalars_4.z * r9.y + UniformPixelScalars_4.w;
  r3.w = r3.w + -r2.w;
  r2.w = r0.w * r3.w + r2.w;
  r3.w = -UniformPixelScalars_5.y + UniformPixelScalars_4.x;
  r3.w = UniformPixelScalars_5.x * r3.w + UniformPixelScalars_5.y;
  r3.w = r3.w + -r2.w;
  r2.w = r1.w * r3.w + r2.w;
  r3.w = UniformPixelScalars_5.z + -UniformPixelScalars_5.w;
  r0.w = r0.w * r3.w + UniformPixelScalars_5.w;
  r3.w = UniformPixelScalars_6.x + -r0.w;
  r0.w = r1.w * r3.w + r0.w;
  r9.xyz = float3(0.0799999982,0.0799999982,0.0799999982) * r8.xyz;
  r6.xyz = r6.xyz * DiffuseMultiplier + -r9.xyz;
  r6.xyz = r0.www * r6.xyz + r9.xyz;
  r1.w = saturate(r8.x + r8.x);
  r1.w = -1 + r1.w;
  r1.w = r0.w * r1.w + 1;
  r6.xyz = r6.xyz * r1.www;
  r7.xyz = -r7.xyz * r0.www + r7.xyz;
  r9.x = saturate(dot(r5.yz, float2(0.816496611,0.577350259)));
  r9.y = saturate(dot(r5.zxy, float3(0.577350259,-0.707106769,-0.408248305)));
  r9.z = saturate(dot(r5.xyz, float3(0.707106769,-0.408248305,0.577350259)));
  r9.xyz = r9.xyz * r9.xyz;
  r10.xyz = LightMapTextures_0_.Sample(LightMapTexturesSampler_0__s, v3.xy).xyz;
  r10.xyz = LightMapScale[0].xyz * r10.xyz;
  r11.xyz = LightMapTextures_1_.Sample(LightMapTexturesSampler_1__s, v3.xy).xyz;
  r11.xyz = LightMapScale[1].xyz * r11.xyz;
  r0.w = dot(r11.xyz, r9.xyz);
  r9.xyz = r10.xyz * r0.www;
  r10.xyz = r9.xyz * r7.xyz;
  r10.xyz = UniformPixelVector_0.xyz * EmissiveMultiplier + r10.xyz;
  r0.w = dot(r9.xyz, float3(0.300000012,0.589999974,0.109999999));
  r1.w = dot(v7.xyz, v7.xyz);
  r1.w = rsqrt(r1.w);
  r9.xyz = v7.xyz * r1.www;
  r1.x = dot(r1.xyz, r5.xyz);
  r1.y = dot(r2.xyz, r5.xyz);
  r1.z = dot(r0.xyz, r5.xyz);
  r0.x = dot(r9.xyz, r1.xyz);
  r0.x = r0.x + r0.x;
  r0.xyz = r1.xyz * -r0.xxx + r9.xyz;
  r1.w = log2(r2.w);
  r1.w = -r1.w * 1.20000005 + 1;
  r1.w = 6 + -r1.w;
  r2.xyz = cmp(float3(0,0,0) != IBLUseProxyVolume.xyz);
  r3.w = (int)r2.y | (int)r2.x;
  r3.w = (int)r2.z | (int)r3.w;
  if (r3.w != 0) {
    r4.w = cmp(0 != IBLPositionAndWeight0.w);
    if (r4.w != 0) {
      r9.xyz = IBLProxyOBB0._m01_m11_m21 * r0.yyy;
      r9.xyz = IBLProxyOBB0._m00_m10_m20 * r0.xxx + r9.xyz;
      r9.xyz = IBLProxyOBB0._m02_m12_m22 * r0.zzz + r9.xyz;
      r11.xyz = IBLProxyOBB0._m01_m11_m21 * r3.yyy;
      r11.xyz = IBLProxyOBB0._m00_m10_m20 * r3.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB0._m02_m12_m22 * r3.zzz + r11.xyz;
      r11.xyz = IBLProxyOBB0._m03_m13_m23 + r11.xyz;
      r12.xyz = float3(1,1,1) + -r11.xyz;
      r12.xyz = r12.xyz / r9.xyz;
      r11.xyz = float3(-1,-1,-1) + -r11.xyz;
      r9.xyz = r11.xyz / r9.xyz;
      r9.xyz = max(r12.xyz, r9.xyz);
      r4.w = min(r9.y, r9.z);
      r4.w = min(r9.x, r4.w);
      r4.w = r2.x ? r4.w : 0;
      r9.xyz = IBLProxyOBB1._m01_m11_m21 * r0.yyy;
      r9.xyz = IBLProxyOBB1._m00_m10_m20 * r0.xxx + r9.xyz;
      r9.xyz = IBLProxyOBB1._m02_m12_m22 * r0.zzz + r9.xyz;
      r11.xyz = IBLProxyOBB1._m01_m11_m21 * r3.yyy;
      r11.xyz = IBLProxyOBB1._m00_m10_m20 * r3.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB1._m02_m12_m22 * r3.zzz + r11.xyz;
      r11.xyz = IBLProxyOBB1._m03_m13_m23 + r11.xyz;
      r12.xyz = float3(1,1,1) + -r11.xyz;
      r12.xyz = r12.xyz / r9.xyz;
      r11.xyz = float3(-1,-1,-1) + -r11.xyz;
      r9.xyz = r11.xyz / r9.xyz;
      r9.xyz = max(r12.xyz, r9.xyz);
      r5.w = min(r9.y, r9.z);
      r5.w = min(r9.x, r5.w);
      r5.w = r2.y ? r5.w : 0;
      r9.xyz = IBLProxyOBB2._m01_m11_m21 * r0.yyy;
      r9.xyz = IBLProxyOBB2._m00_m10_m20 * r0.xxx + r9.xyz;
      r9.xyz = IBLProxyOBB2._m02_m12_m22 * r0.zzz + r9.xyz;
      r11.xyz = IBLProxyOBB2._m01_m11_m21 * r3.yyy;
      r11.xyz = IBLProxyOBB2._m00_m10_m20 * r3.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB2._m02_m12_m22 * r3.zzz + r11.xyz;
      r11.xyz = IBLProxyOBB2._m03_m13_m23 + r11.xyz;
      r12.xyz = float3(1,1,1) + -r11.xyz;
      r12.xyz = r12.xyz / r9.xyz;
      r11.xyz = float3(-1,-1,-1) + -r11.xyz;
      r9.xyz = r11.xyz / r9.xyz;
      r9.xyz = max(r12.xyz, r9.xyz);
      r6.w = min(r9.y, r9.z);
      r6.w = min(r9.x, r6.w);
      r6.w = r2.z ? r6.w : 0;
      r4.w = max(r5.w, r4.w);
      r4.w = max(r4.w, r6.w);
      r9.xyz = r0.xyz * r4.www + r3.xyz;
      r9.xyz = -IBLPositionAndWeight0.xyz + r9.xyz;
      r9.xyz = r3.www ? r9.xyz : r0.xyz;
      r4.w = dot(r9.xyz, r9.xyz);
      r4.w = rsqrt(r4.w);
      r9.xyz = r9.xyz * r4.www;
      r9.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r9.xyz, r1.w).xyz;
      r4.w = cmp(0 != IBLUseLastProxyVolume.w);
      if (r4.w != 0) {
        r11.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
        r4.w = (int)r11.y | (int)r11.x;
        r4.w = (int)r11.z | (int)r4.w;
        r12.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
        r12.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r12.xyz;
        r12.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r12.xyz;
        r13.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
        r13.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r13.xyz;
        r13.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r13.xyz;
        r13.xyz = IBLLastProxyOBB0._m03_m13_m23 + r13.xyz;
        r14.xyz = float3(1,1,1) + -r13.xyz;
        r14.xyz = r14.xyz / r12.xyz;
        r13.xyz = float3(-1,-1,-1) + -r13.xyz;
        r12.xyz = r13.xyz / r12.xyz;
        r12.xyz = max(r14.xyz, r12.xyz);
        r5.w = min(r12.y, r12.z);
        r5.w = min(r12.x, r5.w);
        r5.w = r11.x ? r5.w : 0;
        r12.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
        r12.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r12.xyz;
        r12.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r12.xyz;
        r13.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
        r13.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r13.xyz;
        r13.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r13.xyz;
        r13.xyz = IBLLastProxyOBB1._m03_m13_m23 + r13.xyz;
        r14.xyz = float3(1,1,1) + -r13.xyz;
        r14.xyz = r14.xyz / r12.xyz;
        r13.xyz = float3(-1,-1,-1) + -r13.xyz;
        r12.xyz = r13.xyz / r12.xyz;
        r12.xyz = max(r14.xyz, r12.xyz);
        r6.w = min(r12.y, r12.z);
        r6.w = min(r12.x, r6.w);
        r6.w = r11.y ? r6.w : 0;
        r11.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
        r11.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r11.xyw;
        r11.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r11.xyw;
        r12.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
        r12.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r12.xyz;
        r12.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r12.xyz;
        r12.xyz = IBLLastProxyOBB2._m03_m13_m23 + r12.xyz;
        r13.xyz = float3(1,1,1) + -r12.xyz;
        r13.xyz = r13.xyz / r11.xyw;
        r12.xyz = float3(-1,-1,-1) + -r12.xyz;
        r11.xyw = r12.xyz / r11.xyw;
        r11.xyw = max(r13.xyz, r11.xyw);
        r7.w = min(r11.y, r11.w);
        r7.w = min(r11.x, r7.w);
        r7.w = r11.z ? r7.w : 0;
        r5.w = max(r6.w, r5.w);
        r5.w = max(r5.w, r7.w);
        r11.xyz = r0.xyz * r5.www + r3.xyz;
        r11.xyz = -IBLPositionAndWeight0.xyz + r11.xyz;
        r11.xyz = r4.www ? r11.xyz : r0.xyz;
        r4.w = dot(r11.xyz, r11.xyz);
        r4.w = rsqrt(r4.w);
        r11.xyz = r11.xyz * r4.www;
        r11.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r11.xyz, r1.w).xyz;
        r11.xyz = r11.xyz + -r9.xyz;
        r9.xyz = IBLUseLastProxyVolume.www * r11.xyz + r9.xyz;
      }
      r9.xyz = IBLPositionAndWeight0.www * r9.xyz;
    } else {
      r9.xyz = float3(0,0,0);
    }
    r4.w = cmp(0 != IBLPositionAndWeight1.w);
    if (r4.w != 0) {
      r11.xyz = IBLProxyOBB0._m01_m11_m21 * r0.yyy;
      r11.xyz = IBLProxyOBB0._m00_m10_m20 * r0.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB0._m02_m12_m22 * r0.zzz + r11.xyz;
      r12.xyz = IBLProxyOBB0._m01_m11_m21 * r3.yyy;
      r12.xyz = IBLProxyOBB0._m00_m10_m20 * r3.xxx + r12.xyz;
      r12.xyz = IBLProxyOBB0._m02_m12_m22 * r3.zzz + r12.xyz;
      r12.xyz = IBLProxyOBB0._m03_m13_m23 + r12.xyz;
      r13.xyz = float3(1,1,1) + -r12.xyz;
      r13.xyz = r13.xyz / r11.xyz;
      r12.xyz = float3(-1,-1,-1) + -r12.xyz;
      r11.xyz = r12.xyz / r11.xyz;
      r11.xyz = max(r13.xyz, r11.xyz);
      r4.w = min(r11.y, r11.z);
      r4.w = min(r11.x, r4.w);
      r4.w = r2.x ? r4.w : 0;
      r11.xyz = IBLProxyOBB1._m01_m11_m21 * r0.yyy;
      r11.xyz = IBLProxyOBB1._m00_m10_m20 * r0.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB1._m02_m12_m22 * r0.zzz + r11.xyz;
      r12.xyz = IBLProxyOBB1._m01_m11_m21 * r3.yyy;
      r12.xyz = IBLProxyOBB1._m00_m10_m20 * r3.xxx + r12.xyz;
      r12.xyz = IBLProxyOBB1._m02_m12_m22 * r3.zzz + r12.xyz;
      r12.xyz = IBLProxyOBB1._m03_m13_m23 + r12.xyz;
      r13.xyz = float3(1,1,1) + -r12.xyz;
      r13.xyz = r13.xyz / r11.xyz;
      r12.xyz = float3(-1,-1,-1) + -r12.xyz;
      r11.xyz = r12.xyz / r11.xyz;
      r11.xyz = max(r13.xyz, r11.xyz);
      r5.w = min(r11.y, r11.z);
      r5.w = min(r11.x, r5.w);
      r5.w = r2.y ? r5.w : 0;
      r11.xyz = IBLProxyOBB2._m01_m11_m21 * r0.yyy;
      r11.xyz = IBLProxyOBB2._m00_m10_m20 * r0.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB2._m02_m12_m22 * r0.zzz + r11.xyz;
      r12.xyz = IBLProxyOBB2._m01_m11_m21 * r3.yyy;
      r12.xyz = IBLProxyOBB2._m00_m10_m20 * r3.xxx + r12.xyz;
      r12.xyz = IBLProxyOBB2._m02_m12_m22 * r3.zzz + r12.xyz;
      r12.xyz = IBLProxyOBB2._m03_m13_m23 + r12.xyz;
      r13.xyz = float3(1,1,1) + -r12.xyz;
      r13.xyz = r13.xyz / r11.xyz;
      r12.xyz = float3(-1,-1,-1) + -r12.xyz;
      r11.xyz = r12.xyz / r11.xyz;
      r11.xyz = max(r13.xyz, r11.xyz);
      r6.w = min(r11.y, r11.z);
      r6.w = min(r11.x, r6.w);
      r6.w = r2.z ? r6.w : 0;
      r4.w = max(r5.w, r4.w);
      r4.w = max(r4.w, r6.w);
      r11.xyz = r0.xyz * r4.www + r3.xyz;
      r11.xyz = -IBLPositionAndWeight1.xyz + r11.xyz;
      r11.xyz = r3.www ? r11.xyz : r0.xyz;
      r4.w = dot(r11.xyz, r11.xyz);
      r4.w = rsqrt(r4.w);
      r11.xyz = r11.xyz * r4.www;
      r11.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r11.xyz, r1.w).xyz;
      r4.w = cmp(0 != IBLUseLastProxyVolume.w);
      if (r4.w != 0) {
        r12.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
        r4.w = (int)r12.y | (int)r12.x;
        r4.w = (int)r12.z | (int)r4.w;
        r13.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
        r13.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r13.xyz;
        r13.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r13.xyz;
        r14.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
        r14.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r14.xyz;
        r14.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r14.xyz;
        r14.xyz = IBLLastProxyOBB0._m03_m13_m23 + r14.xyz;
        r15.xyz = float3(1,1,1) + -r14.xyz;
        r15.xyz = r15.xyz / r13.xyz;
        r14.xyz = float3(-1,-1,-1) + -r14.xyz;
        r13.xyz = r14.xyz / r13.xyz;
        r13.xyz = max(r15.xyz, r13.xyz);
        r5.w = min(r13.y, r13.z);
        r5.w = min(r13.x, r5.w);
        r5.w = r12.x ? r5.w : 0;
        r13.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
        r13.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r13.xyz;
        r13.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r13.xyz;
        r14.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
        r14.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r14.xyz;
        r14.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r14.xyz;
        r14.xyz = IBLLastProxyOBB1._m03_m13_m23 + r14.xyz;
        r15.xyz = float3(1,1,1) + -r14.xyz;
        r15.xyz = r15.xyz / r13.xyz;
        r14.xyz = float3(-1,-1,-1) + -r14.xyz;
        r13.xyz = r14.xyz / r13.xyz;
        r13.xyz = max(r15.xyz, r13.xyz);
        r6.w = min(r13.y, r13.z);
        r6.w = min(r13.x, r6.w);
        r6.w = r12.y ? r6.w : 0;
        r12.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
        r12.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r12.xyw;
        r12.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r12.xyw;
        r13.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
        r13.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r13.xyz;
        r13.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r13.xyz;
        r13.xyz = IBLLastProxyOBB2._m03_m13_m23 + r13.xyz;
        r14.xyz = float3(1,1,1) + -r13.xyz;
        r14.xyz = r14.xyz / r12.xyw;
        r13.xyz = float3(-1,-1,-1) + -r13.xyz;
        r12.xyw = r13.xyz / r12.xyw;
        r12.xyw = max(r14.xyz, r12.xyw);
        r7.w = min(r12.y, r12.w);
        r7.w = min(r12.x, r7.w);
        r7.w = r12.z ? r7.w : 0;
        r5.w = max(r6.w, r5.w);
        r5.w = max(r5.w, r7.w);
        r12.xyz = r0.xyz * r5.www + r3.xyz;
        r12.xyz = -IBLPositionAndWeight1.xyz + r12.xyz;
        r12.xyz = r4.www ? r12.xyz : r0.xyz;
        r4.w = dot(r12.xyz, r12.xyz);
        r4.w = rsqrt(r4.w);
        r12.xyz = r12.xyz * r4.www;
        r12.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r12.xyz, r1.w).xyz;
        r12.xyz = r12.xyz + -r11.xyz;
        r11.xyz = IBLUseLastProxyVolume.www * r12.xyz + r11.xyz;
      }
      r9.xyz = r11.xyz * IBLPositionAndWeight1.www + r9.xyz;
    }
    r4.w = cmp(0 != IBLPositionAndWeight2.w);
    if (r4.w != 0) {
      r11.xyz = IBLProxyOBB0._m01_m11_m21 * r0.yyy;
      r11.xyz = IBLProxyOBB0._m00_m10_m20 * r0.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB0._m02_m12_m22 * r0.zzz + r11.xyz;
      r12.xyz = IBLProxyOBB0._m01_m11_m21 * r3.yyy;
      r12.xyz = IBLProxyOBB0._m00_m10_m20 * r3.xxx + r12.xyz;
      r12.xyz = IBLProxyOBB0._m02_m12_m22 * r3.zzz + r12.xyz;
      r12.xyz = IBLProxyOBB0._m03_m13_m23 + r12.xyz;
      r13.xyz = float3(1,1,1) + -r12.xyz;
      r13.xyz = r13.xyz / r11.xyz;
      r12.xyz = float3(-1,-1,-1) + -r12.xyz;
      r11.xyz = r12.xyz / r11.xyz;
      r11.xyz = max(r13.xyz, r11.xyz);
      r4.w = min(r11.y, r11.z);
      r4.w = min(r11.x, r4.w);
      r4.w = r2.x ? r4.w : 0;
      r11.xyz = IBLProxyOBB1._m01_m11_m21 * r0.yyy;
      r11.xyz = IBLProxyOBB1._m00_m10_m20 * r0.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB1._m02_m12_m22 * r0.zzz + r11.xyz;
      r12.xyz = IBLProxyOBB1._m01_m11_m21 * r3.yyy;
      r12.xyz = IBLProxyOBB1._m00_m10_m20 * r3.xxx + r12.xyz;
      r12.xyz = IBLProxyOBB1._m02_m12_m22 * r3.zzz + r12.xyz;
      r12.xyz = IBLProxyOBB1._m03_m13_m23 + r12.xyz;
      r13.xyz = float3(1,1,1) + -r12.xyz;
      r13.xyz = r13.xyz / r11.xyz;
      r12.xyz = float3(-1,-1,-1) + -r12.xyz;
      r11.xyz = r12.xyz / r11.xyz;
      r11.xyz = max(r13.xyz, r11.xyz);
      r5.w = min(r11.y, r11.z);
      r5.w = min(r11.x, r5.w);
      r5.w = r2.y ? r5.w : 0;
      r11.xyz = IBLProxyOBB2._m01_m11_m21 * r0.yyy;
      r11.xyz = IBLProxyOBB2._m00_m10_m20 * r0.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB2._m02_m12_m22 * r0.zzz + r11.xyz;
      r12.xyz = IBLProxyOBB2._m01_m11_m21 * r3.yyy;
      r12.xyz = IBLProxyOBB2._m00_m10_m20 * r3.xxx + r12.xyz;
      r12.xyz = IBLProxyOBB2._m02_m12_m22 * r3.zzz + r12.xyz;
      r12.xyz = IBLProxyOBB2._m03_m13_m23 + r12.xyz;
      r13.xyz = float3(1,1,1) + -r12.xyz;
      r13.xyz = r13.xyz / r11.xyz;
      r12.xyz = float3(-1,-1,-1) + -r12.xyz;
      r11.xyz = r12.xyz / r11.xyz;
      r11.xyz = max(r13.xyz, r11.xyz);
      r6.w = min(r11.y, r11.z);
      r6.w = min(r11.x, r6.w);
      r6.w = r2.z ? r6.w : 0;
      r4.w = max(r5.w, r4.w);
      r4.w = max(r4.w, r6.w);
      r11.xyz = r0.xyz * r4.www + r3.xyz;
      r11.xyz = -IBLPositionAndWeight2.xyz + r11.xyz;
      r11.xyz = r3.www ? r11.xyz : r0.xyz;
      r4.w = dot(r11.xyz, r11.xyz);
      r4.w = rsqrt(r4.w);
      r11.xyz = r11.xyz * r4.www;
      r11.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r11.xyz, r1.w).xyz;
      r4.w = cmp(0 != IBLUseLastProxyVolume.w);
      if (r4.w != 0) {
        r12.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
        r4.w = (int)r12.y | (int)r12.x;
        r4.w = (int)r12.z | (int)r4.w;
        r13.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
        r13.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r13.xyz;
        r13.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r13.xyz;
        r14.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
        r14.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r14.xyz;
        r14.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r14.xyz;
        r14.xyz = IBLLastProxyOBB0._m03_m13_m23 + r14.xyz;
        r15.xyz = float3(1,1,1) + -r14.xyz;
        r15.xyz = r15.xyz / r13.xyz;
        r14.xyz = float3(-1,-1,-1) + -r14.xyz;
        r13.xyz = r14.xyz / r13.xyz;
        r13.xyz = max(r15.xyz, r13.xyz);
        r5.w = min(r13.y, r13.z);
        r5.w = min(r13.x, r5.w);
        r5.w = r12.x ? r5.w : 0;
        r13.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
        r13.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r13.xyz;
        r13.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r13.xyz;
        r14.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
        r14.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r14.xyz;
        r14.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r14.xyz;
        r14.xyz = IBLLastProxyOBB1._m03_m13_m23 + r14.xyz;
        r15.xyz = float3(1,1,1) + -r14.xyz;
        r15.xyz = r15.xyz / r13.xyz;
        r14.xyz = float3(-1,-1,-1) + -r14.xyz;
        r13.xyz = r14.xyz / r13.xyz;
        r13.xyz = max(r15.xyz, r13.xyz);
        r6.w = min(r13.y, r13.z);
        r6.w = min(r13.x, r6.w);
        r6.w = r12.y ? r6.w : 0;
        r12.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
        r12.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r12.xyw;
        r12.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r12.xyw;
        r13.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
        r13.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r13.xyz;
        r13.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r13.xyz;
        r13.xyz = IBLLastProxyOBB2._m03_m13_m23 + r13.xyz;
        r14.xyz = float3(1,1,1) + -r13.xyz;
        r14.xyz = r14.xyz / r12.xyw;
        r13.xyz = float3(-1,-1,-1) + -r13.xyz;
        r12.xyw = r13.xyz / r12.xyw;
        r12.xyw = max(r14.xyz, r12.xyw);
        r7.w = min(r12.y, r12.w);
        r7.w = min(r12.x, r7.w);
        r7.w = r12.z ? r7.w : 0;
        r5.w = max(r6.w, r5.w);
        r5.w = max(r5.w, r7.w);
        r12.xyz = r0.xyz * r5.www + r3.xyz;
        r12.xyz = -IBLPositionAndWeight2.xyz + r12.xyz;
        r12.xyz = r4.www ? r12.xyz : r0.xyz;
        r4.w = dot(r12.xyz, r12.xyz);
        r4.w = rsqrt(r4.w);
        r12.xyz = r12.xyz * r4.www;
        r12.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r12.xyz, r1.w).xyz;
        r12.xyz = r12.xyz + -r11.xyz;
        r11.xyz = IBLUseLastProxyVolume.www * r12.xyz + r11.xyz;
      }
      r9.xyz = r11.xyz * IBLPositionAndWeight2.www + r9.xyz;
    }
    r4.w = cmp(0 != IBLPositionAndWeight3.w);
    if (r4.w != 0) {
      r11.xyz = IBLProxyOBB0._m01_m11_m21 * r0.yyy;
      r11.xyz = IBLProxyOBB0._m00_m10_m20 * r0.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB0._m02_m12_m22 * r0.zzz + r11.xyz;
      r12.xyz = IBLProxyOBB0._m01_m11_m21 * r3.yyy;
      r12.xyz = IBLProxyOBB0._m00_m10_m20 * r3.xxx + r12.xyz;
      r12.xyz = IBLProxyOBB0._m02_m12_m22 * r3.zzz + r12.xyz;
      r12.xyz = IBLProxyOBB0._m03_m13_m23 + r12.xyz;
      r13.xyz = float3(1,1,1) + -r12.xyz;
      r13.xyz = r13.xyz / r11.xyz;
      r12.xyz = float3(-1,-1,-1) + -r12.xyz;
      r11.xyz = r12.xyz / r11.xyz;
      r11.xyz = max(r13.xyz, r11.xyz);
      r4.w = min(r11.y, r11.z);
      r4.w = min(r11.x, r4.w);
      r2.x = r2.x ? r4.w : 0;
      r11.xyz = IBLProxyOBB1._m01_m11_m21 * r0.yyy;
      r11.xyz = IBLProxyOBB1._m00_m10_m20 * r0.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB1._m02_m12_m22 * r0.zzz + r11.xyz;
      r12.xyz = IBLProxyOBB1._m01_m11_m21 * r3.yyy;
      r12.xyz = IBLProxyOBB1._m00_m10_m20 * r3.xxx + r12.xyz;
      r12.xyz = IBLProxyOBB1._m02_m12_m22 * r3.zzz + r12.xyz;
      r12.xyz = IBLProxyOBB1._m03_m13_m23 + r12.xyz;
      r13.xyz = float3(1,1,1) + -r12.xyz;
      r13.xyz = r13.xyz / r11.xyz;
      r12.xyz = float3(-1,-1,-1) + -r12.xyz;
      r11.xyz = r12.xyz / r11.xyz;
      r11.xyz = max(r13.xyz, r11.xyz);
      r4.w = min(r11.y, r11.z);
      r4.w = min(r11.x, r4.w);
      r2.y = r2.y ? r4.w : 0;
      r11.xyz = IBLProxyOBB2._m01_m11_m21 * r0.yyy;
      r11.xyz = IBLProxyOBB2._m00_m10_m20 * r0.xxx + r11.xyz;
      r11.xyz = IBLProxyOBB2._m02_m12_m22 * r0.zzz + r11.xyz;
      r12.xyz = IBLProxyOBB2._m01_m11_m21 * r3.yyy;
      r12.xyz = IBLProxyOBB2._m00_m10_m20 * r3.xxx + r12.xyz;
      r12.xyz = IBLProxyOBB2._m02_m12_m22 * r3.zzz + r12.xyz;
      r12.xyz = IBLProxyOBB2._m03_m13_m23 + r12.xyz;
      r13.xyz = float3(1,1,1) + -r12.xyz;
      r13.xyz = r13.xyz / r11.xyz;
      r12.xyz = float3(-1,-1,-1) + -r12.xyz;
      r11.xyz = r12.xyz / r11.xyz;
      r11.xyz = max(r13.xyz, r11.xyz);
      r4.w = min(r11.y, r11.z);
      r4.w = min(r11.x, r4.w);
      r2.z = r2.z ? r4.w : 0;
      r2.x = max(r2.x, r2.y);
      r2.x = max(r2.x, r2.z);
      r2.xyz = r0.xyz * r2.xxx + r3.xyz;
      r2.xyz = -IBLPositionAndWeight3.xyz + r2.xyz;
      r2.xyz = r3.www ? r2.xyz : r0.xyz;
      r3.w = dot(r2.xyz, r2.xyz);
      r3.w = rsqrt(r3.w);
      r2.xyz = r3.www * r2.xyz;
      r2.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r2.xyz, r1.w).xyz;
      r3.w = cmp(0 != IBLUseLastProxyVolume.w);
      if (r3.w != 0) {
        r11.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
        r3.w = (int)r11.y | (int)r11.x;
        r3.w = (int)r11.z | (int)r3.w;
        r12.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
        r12.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r12.xyz;
        r12.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r12.xyz;
        r13.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
        r13.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r13.xyz;
        r13.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r13.xyz;
        r13.xyz = IBLLastProxyOBB0._m03_m13_m23 + r13.xyz;
        r14.xyz = float3(1,1,1) + -r13.xyz;
        r14.xyz = r14.xyz / r12.xyz;
        r13.xyz = float3(-1,-1,-1) + -r13.xyz;
        r12.xyz = r13.xyz / r12.xyz;
        r12.xyz = max(r14.xyz, r12.xyz);
        r4.w = min(r12.y, r12.z);
        r4.w = min(r12.x, r4.w);
        r4.w = r11.x ? r4.w : 0;
        r12.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
        r12.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r12.xyz;
        r12.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r12.xyz;
        r13.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
        r13.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r13.xyz;
        r13.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r13.xyz;
        r13.xyz = IBLLastProxyOBB1._m03_m13_m23 + r13.xyz;
        r14.xyz = float3(1,1,1) + -r13.xyz;
        r14.xyz = r14.xyz / r12.xyz;
        r13.xyz = float3(-1,-1,-1) + -r13.xyz;
        r12.xyz = r13.xyz / r12.xyz;
        r12.xyz = max(r14.xyz, r12.xyz);
        r5.w = min(r12.y, r12.z);
        r5.w = min(r12.x, r5.w);
        r5.w = r11.y ? r5.w : 0;
        r11.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
        r11.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r11.xyw;
        r11.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r11.xyw;
        r12.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
        r12.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r12.xyz;
        r12.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r12.xyz;
        r12.xyz = IBLLastProxyOBB2._m03_m13_m23 + r12.xyz;
        r13.xyz = float3(1,1,1) + -r12.xyz;
        r13.xyz = r13.xyz / r11.xyw;
        r12.xyz = float3(-1,-1,-1) + -r12.xyz;
        r11.xyw = r12.xyz / r11.xyw;
        r11.xyw = max(r13.xyz, r11.xyw);
        r6.w = min(r11.y, r11.w);
        r6.w = min(r11.x, r6.w);
        r6.w = r11.z ? r6.w : 0;
        r4.w = max(r5.w, r4.w);
        r4.w = max(r4.w, r6.w);
        r11.xyz = r0.xyz * r4.www + r3.xyz;
        r11.xyz = -IBLPositionAndWeight3.xyz + r11.xyz;
        r11.xyz = r3.www ? r11.xyz : r0.xyz;
        r3.w = dot(r11.xyz, r11.xyz);
        r3.w = rsqrt(r3.w);
        r11.xyz = r11.xyz * r3.www;
        r11.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r11.xyz, r1.w).xyz;
        r11.xyz = r11.xyz + -r2.xyz;
        r2.xyz = IBLUseLastProxyVolume.www * r11.xyz + r2.xyz;
      }
      r9.xyz = r2.xyz * IBLPositionAndWeight3.www + r9.xyz;
    }
  } else {
    r9.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r0.xyz, r1.w).xyz;
    r2.x = cmp(0 != IBLUseLastProxyVolume.w);
    if (r2.x != 0) {
      r2.x = cmp(0 != IBLPositionAndWeight0.w);
      if (r2.x != 0) {
        r2.x = dot(r0.xyz, r0.xyz);
        r2.x = rsqrt(r2.x);
        r2.xyz = r2.xxx * r0.xyz;
        r2.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r2.xyz, r1.w).xyz;
        r3.w = cmp(0 != IBLUseLastProxyVolume.w);
        if (r3.w != 0) {
          r11.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
          r3.w = (int)r11.y | (int)r11.x;
          r3.w = (int)r11.z | (int)r3.w;
          r12.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
          r12.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r12.xyz;
          r12.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r12.xyz;
          r13.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
          r13.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r13.xyz;
          r13.xyz = IBLLastProxyOBB0._m03_m13_m23 + r13.xyz;
          r14.xyz = float3(1,1,1) + -r13.xyz;
          r14.xyz = r14.xyz / r12.xyz;
          r13.xyz = float3(-1,-1,-1) + -r13.xyz;
          r12.xyz = r13.xyz / r12.xyz;
          r12.xyz = max(r14.xyz, r12.xyz);
          r4.w = min(r12.y, r12.z);
          r4.w = min(r12.x, r4.w);
          r4.w = r11.x ? r4.w : 0;
          r12.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
          r12.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r12.xyz;
          r12.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r12.xyz;
          r13.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
          r13.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r13.xyz;
          r13.xyz = IBLLastProxyOBB1._m03_m13_m23 + r13.xyz;
          r14.xyz = float3(1,1,1) + -r13.xyz;
          r14.xyz = r14.xyz / r12.xyz;
          r13.xyz = float3(-1,-1,-1) + -r13.xyz;
          r12.xyz = r13.xyz / r12.xyz;
          r12.xyz = max(r14.xyz, r12.xyz);
          r5.w = min(r12.y, r12.z);
          r5.w = min(r12.x, r5.w);
          r5.w = r11.y ? r5.w : 0;
          r11.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
          r11.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r11.xyw;
          r11.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r11.xyw;
          r12.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
          r12.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r12.xyz;
          r12.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r12.xyz;
          r12.xyz = IBLLastProxyOBB2._m03_m13_m23 + r12.xyz;
          r13.xyz = float3(1,1,1) + -r12.xyz;
          r13.xyz = r13.xyz / r11.xyw;
          r12.xyz = float3(-1,-1,-1) + -r12.xyz;
          r11.xyw = r12.xyz / r11.xyw;
          r11.xyw = max(r13.xyz, r11.xyw);
          r6.w = min(r11.y, r11.w);
          r6.w = min(r11.x, r6.w);
          r6.w = r11.z ? r6.w : 0;
          r4.w = max(r5.w, r4.w);
          r4.w = max(r4.w, r6.w);
          r11.xyz = r0.xyz * r4.www + r3.xyz;
          r11.xyz = -IBLPositionAndWeight0.xyz + r11.xyz;
          r11.xyz = r3.www ? r11.xyz : r0.xyz;
          r3.w = dot(r11.xyz, r11.xyz);
          r3.w = rsqrt(r3.w);
          r11.xyz = r11.xyz * r3.www;
          r11.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r11.xyz, r1.w).xyz;
          r11.xyz = r11.xyz + -r2.xyz;
          r2.xyz = IBLUseLastProxyVolume.www * r11.xyz + r2.xyz;
        }
        r2.xyz = IBLPositionAndWeight0.www * r2.xyz;
      } else {
        r2.xyz = float3(0,0,0);
      }
      r3.w = cmp(0 != IBLPositionAndWeight1.w);
      if (r3.w != 0) {
        r3.w = dot(r0.xyz, r0.xyz);
        r3.w = rsqrt(r3.w);
        r11.xyz = r3.www * r0.xyz;
        r11.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r11.xyz, r1.w).xyz;
        r3.w = cmp(0 != IBLUseLastProxyVolume.w);
        if (r3.w != 0) {
          r12.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
          r3.w = (int)r12.y | (int)r12.x;
          r3.w = (int)r12.z | (int)r3.w;
          r13.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
          r13.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r13.xyz;
          r14.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
          r14.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r14.xyz;
          r14.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r14.xyz;
          r14.xyz = IBLLastProxyOBB0._m03_m13_m23 + r14.xyz;
          r15.xyz = float3(1,1,1) + -r14.xyz;
          r15.xyz = r15.xyz / r13.xyz;
          r14.xyz = float3(-1,-1,-1) + -r14.xyz;
          r13.xyz = r14.xyz / r13.xyz;
          r13.xyz = max(r15.xyz, r13.xyz);
          r4.w = min(r13.y, r13.z);
          r4.w = min(r13.x, r4.w);
          r4.w = r12.x ? r4.w : 0;
          r13.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
          r13.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r13.xyz;
          r14.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
          r14.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r14.xyz;
          r14.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r14.xyz;
          r14.xyz = IBLLastProxyOBB1._m03_m13_m23 + r14.xyz;
          r15.xyz = float3(1,1,1) + -r14.xyz;
          r15.xyz = r15.xyz / r13.xyz;
          r14.xyz = float3(-1,-1,-1) + -r14.xyz;
          r13.xyz = r14.xyz / r13.xyz;
          r13.xyz = max(r15.xyz, r13.xyz);
          r5.w = min(r13.y, r13.z);
          r5.w = min(r13.x, r5.w);
          r5.w = r12.y ? r5.w : 0;
          r12.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
          r12.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r12.xyw;
          r12.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r12.xyw;
          r13.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
          r13.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r13.xyz;
          r13.xyz = IBLLastProxyOBB2._m03_m13_m23 + r13.xyz;
          r14.xyz = float3(1,1,1) + -r13.xyz;
          r14.xyz = r14.xyz / r12.xyw;
          r13.xyz = float3(-1,-1,-1) + -r13.xyz;
          r12.xyw = r13.xyz / r12.xyw;
          r12.xyw = max(r14.xyz, r12.xyw);
          r6.w = min(r12.y, r12.w);
          r6.w = min(r12.x, r6.w);
          r6.w = r12.z ? r6.w : 0;
          r4.w = max(r5.w, r4.w);
          r4.w = max(r4.w, r6.w);
          r12.xyz = r0.xyz * r4.www + r3.xyz;
          r12.xyz = -IBLPositionAndWeight1.xyz + r12.xyz;
          r12.xyz = r3.www ? r12.xyz : r0.xyz;
          r3.w = dot(r12.xyz, r12.xyz);
          r3.w = rsqrt(r3.w);
          r12.xyz = r12.xyz * r3.www;
          r12.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r12.xyz, r1.w).xyz;
          r12.xyz = r12.xyz + -r11.xyz;
          r11.xyz = IBLUseLastProxyVolume.www * r12.xyz + r11.xyz;
        }
        r2.xyz = r11.xyz * IBLPositionAndWeight1.www + r2.xyz;
      }
      r3.w = cmp(0 != IBLPositionAndWeight2.w);
      if (r3.w != 0) {
        r3.w = dot(r0.xyz, r0.xyz);
        r3.w = rsqrt(r3.w);
        r11.xyz = r3.www * r0.xyz;
        r11.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r11.xyz, r1.w).xyz;
        r3.w = cmp(0 != IBLUseLastProxyVolume.w);
        if (r3.w != 0) {
          r12.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
          r3.w = (int)r12.y | (int)r12.x;
          r3.w = (int)r12.z | (int)r3.w;
          r13.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
          r13.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r13.xyz;
          r14.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
          r14.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r14.xyz;
          r14.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r14.xyz;
          r14.xyz = IBLLastProxyOBB0._m03_m13_m23 + r14.xyz;
          r15.xyz = float3(1,1,1) + -r14.xyz;
          r15.xyz = r15.xyz / r13.xyz;
          r14.xyz = float3(-1,-1,-1) + -r14.xyz;
          r13.xyz = r14.xyz / r13.xyz;
          r13.xyz = max(r15.xyz, r13.xyz);
          r4.w = min(r13.y, r13.z);
          r4.w = min(r13.x, r4.w);
          r4.w = r12.x ? r4.w : 0;
          r13.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
          r13.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r13.xyz;
          r14.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
          r14.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r14.xyz;
          r14.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r14.xyz;
          r14.xyz = IBLLastProxyOBB1._m03_m13_m23 + r14.xyz;
          r15.xyz = float3(1,1,1) + -r14.xyz;
          r15.xyz = r15.xyz / r13.xyz;
          r14.xyz = float3(-1,-1,-1) + -r14.xyz;
          r13.xyz = r14.xyz / r13.xyz;
          r13.xyz = max(r15.xyz, r13.xyz);
          r5.w = min(r13.y, r13.z);
          r5.w = min(r13.x, r5.w);
          r5.w = r12.y ? r5.w : 0;
          r12.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
          r12.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r12.xyw;
          r12.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r12.xyw;
          r13.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
          r13.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r13.xyz;
          r13.xyz = IBLLastProxyOBB2._m03_m13_m23 + r13.xyz;
          r14.xyz = float3(1,1,1) + -r13.xyz;
          r14.xyz = r14.xyz / r12.xyw;
          r13.xyz = float3(-1,-1,-1) + -r13.xyz;
          r12.xyw = r13.xyz / r12.xyw;
          r12.xyw = max(r14.xyz, r12.xyw);
          r6.w = min(r12.y, r12.w);
          r6.w = min(r12.x, r6.w);
          r6.w = r12.z ? r6.w : 0;
          r4.w = max(r5.w, r4.w);
          r4.w = max(r4.w, r6.w);
          r12.xyz = r0.xyz * r4.www + r3.xyz;
          r12.xyz = -IBLPositionAndWeight2.xyz + r12.xyz;
          r12.xyz = r3.www ? r12.xyz : r0.xyz;
          r3.w = dot(r12.xyz, r12.xyz);
          r3.w = rsqrt(r3.w);
          r12.xyz = r12.xyz * r3.www;
          r12.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r12.xyz, r1.w).xyz;
          r12.xyz = r12.xyz + -r11.xyz;
          r11.xyz = IBLUseLastProxyVolume.www * r12.xyz + r11.xyz;
        }
        r2.xyz = r11.xyz * IBLPositionAndWeight2.www + r2.xyz;
      }
      r3.w = cmp(0 != IBLPositionAndWeight3.w);
      if (r3.w != 0) {
        r3.w = dot(r0.xyz, r0.xyz);
        r3.w = rsqrt(r3.w);
        r11.xyz = r3.www * r0.xyz;
        r11.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r11.xyz, r1.w).xyz;
        r3.w = cmp(0 != IBLUseLastProxyVolume.w);
        if (r3.w != 0) {
          r12.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
          r3.w = (int)r12.y | (int)r12.x;
          r3.w = (int)r12.z | (int)r3.w;
          r13.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
          r13.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r13.xyz;
          r14.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
          r14.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r14.xyz;
          r14.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r14.xyz;
          r14.xyz = IBLLastProxyOBB0._m03_m13_m23 + r14.xyz;
          r15.xyz = float3(1,1,1) + -r14.xyz;
          r15.xyz = r15.xyz / r13.xyz;
          r14.xyz = float3(-1,-1,-1) + -r14.xyz;
          r13.xyz = r14.xyz / r13.xyz;
          r13.xyz = max(r15.xyz, r13.xyz);
          r4.w = min(r13.y, r13.z);
          r4.w = min(r13.x, r4.w);
          r4.w = r12.x ? r4.w : 0;
          r13.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
          r13.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r13.xyz;
          r14.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
          r14.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r14.xyz;
          r14.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r14.xyz;
          r14.xyz = IBLLastProxyOBB1._m03_m13_m23 + r14.xyz;
          r15.xyz = float3(1,1,1) + -r14.xyz;
          r15.xyz = r15.xyz / r13.xyz;
          r14.xyz = float3(-1,-1,-1) + -r14.xyz;
          r13.xyz = r14.xyz / r13.xyz;
          r13.xyz = max(r15.xyz, r13.xyz);
          r5.w = min(r13.y, r13.z);
          r5.w = min(r13.x, r5.w);
          r5.w = r12.y ? r5.w : 0;
          r12.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
          r12.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r12.xyw;
          r12.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r12.xyw;
          r13.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
          r13.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r13.xyz;
          r13.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r13.xyz;
          r13.xyz = IBLLastProxyOBB2._m03_m13_m23 + r13.xyz;
          r14.xyz = float3(1,1,1) + -r13.xyz;
          r14.xyz = r14.xyz / r12.xyw;
          r13.xyz = float3(-1,-1,-1) + -r13.xyz;
          r12.xyw = r13.xyz / r12.xyw;
          r12.xyw = max(r14.xyz, r12.xyw);
          r6.w = min(r12.y, r12.w);
          r6.w = min(r12.x, r6.w);
          r6.w = r12.z ? r6.w : 0;
          r4.w = max(r5.w, r4.w);
          r4.w = max(r4.w, r6.w);
          r3.xyz = r0.xyz * r4.www + r3.xyz;
          r3.xyz = -IBLPositionAndWeight3.xyz + r3.xyz;
          r3.xyz = r3.www ? r3.xyz : r0.xyz;
          r3.w = dot(r3.xyz, r3.xyz);
          r3.w = rsqrt(r3.w);
          r3.xyz = r3.xyz * r3.www;
          r3.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r3.xyz, r1.w).xyz;
          r3.xyz = r3.xyz + -r11.xyz;
          r11.xyz = IBLUseLastProxyVolume.www * r3.xyz + r11.xyz;
        }
        r2.xyz = r11.xyz * IBLPositionAndWeight3.www + r2.xyz;
      }
      r2.xyz = r2.xyz + -r9.xyz;
      r9.xyz = IBLUseLastProxyVolume.www * r2.xyz + r9.xyz;
    }
  }
  r2.x = cmp(0 != ForcedIBLWeight);
  if (r2.x != 0) {
    r2.xyz = ForcedIBLCubemap.SampleLevel(ForcedIBLCubemapSampler_s, r0.xyz, r1.w).xyz;
    r2.xyz = r2.xyz + -r9.xyz;
    r9.xyz = ForcedIBLWeight * r2.xyz + r9.xyz;
  }
  r2.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r0.xyz, 7).xyz;
  r2.x = r2.x + r2.y;
  r2.x = r2.x + r2.z;
  r2.y = 0.333333343 * r2.x;
  r2.x = cmp(0.00300000003 < r2.x);
  r0.w = r0.w / r2.y;
  r0.w = min(1, r0.w);
  r3.xyz = r9.xyz * r0.www;
  r2.xyz = r2.xxx ? r3.xyz : r9.xyz;
  r0.w = saturate(dot(r5.xyz, r4.xyz));
  r3.xyzw = r2.wwww * float4(-1,-0.0274999999,-0.572000027,0.0219999999) + float4(1,0.0425000004,1.03999996,-0.0399999991);
  r2.w = r3.x * r3.x;
  r0.w = -9.27999973 * r0.w;
  r0.w = exp2(r0.w);
  r0.w = min(r2.w, r0.w);
  r0.w = r0.w * r3.x + r3.y;
  r3.xy = r0.ww * float2(-1.03999996,1.03999996) + r3.zw;
  r0.w = saturate(50 * r6.y);
  r0.w = r3.y * r0.w;
  r3.xyz = r6.xyz * r3.xxx + r0.www;
  r2.xyz = r2.xyz * r3.xyz + r10.xyz;
  r2.xyz = r7.xyz * AmbientColorAndSkyFactor.xyz + r2.xyz;
  r0.w = cmp(0 < AdditionalReflections);
  if (r0.w != 0) {
    r0.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r0.xyz, r1.w).xyz;
    r0.xyz = r0.xyz * r3.xyz;
    r2.xyz = r0.xyz * AdditionalReflections + r2.xyz;
  }
  r0.x = cmp(AdditionalReflections < 0);
  r0.yzw = r2.xyz / -AdditionalReflections;
  o0.xyz = r0.xxx ? r0.yzw : r2.xyz;
  r0.x = dot(r1.xyz, r1.xyz);
  r0.x = rsqrt(r0.x);
  r0.xyz = r1.xyz * r0.xxx;
  o1.xyz = r0.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  o4.w = saturate(0.015625 * DeferredRenderingParameters.z);
  o0.w = 0;
  o1.w = DeferredRenderingParameters.x;
  o2.xyzw = float4(0,0,0,0);
  o3.xyz = r8.xyz;
  o3.w = 0.588223696;
  o4.xyz = r7.xyz;
  o5.xyzw = float4(0,0,0,0);
  o6.xyzw = float4(0,0,0,0);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.39 on Sun Jun 12 00:07:19 2016
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   float4x4 LocalToWorld;             // Offset:    0 Size:    64 [unused]
//   float4x4 ScreenToWorldMatrix;      // Offset:   64 Size:    64 [unused]
//   bool bDecompressSceneColor;        // Offset:  128 Size:     4 [unused]
//   float4 PackedParameters;           // Offset:  144 Size:    16 [unused]
//   float4 MinMaxBlurClamp;            // Offset:  160 Size:    16 [unused]
//   float4 LightColorAndFalloffExponent;// Offset:  176 Size:    16 [unused]
//   float3 DistanceFieldParameters;    // Offset:  192 Size:    12 [unused]
//   float4x4 ScreenToShadowMatrix;     // Offset:  208 Size:    64 [unused]
//   float4 ShadowBufferAndTexelSize;   // Offset:  272 Size:    16 [unused]
//   float ShadowOverrideFactor;        // Offset:  288 Size:     4 [unused]
//   float SSSMultiplier;               // Offset:  292 Size:     4 [unused]
//   bool bReceiveDynamicShadows;       // Offset:  296 Size:     4 [unused]
//   bool bEnableDistanceShadowFading;  // Offset:  300 Size:     4 [unused]
//   float2 DistanceFadeParameters;     // Offset:  304 Size:     8 [unused]
//   float4 IBLPositionAndWeight0;      // Offset:  320 Size:    16
//   float4 IBLPositionAndWeight1;      // Offset:  336 Size:    16
//   float4 IBLPositionAndWeight2;      // Offset:  352 Size:    16
//   float4 IBLPositionAndWeight3;      // Offset:  368 Size:    16
//   float4x4 IBLProxyOBB0;             // Offset:  384 Size:    64
//   float4x4 IBLProxyOBB1;             // Offset:  448 Size:    64
//   float4x4 IBLProxyOBB2;             // Offset:  512 Size:    64
//   float4 IBLUseProxyVolume;          // Offset:  576 Size:    16
//   float4x4 IBLLastProxyOBB0;         // Offset:  592 Size:    64
//   float4x4 IBLLastProxyOBB1;         // Offset:  656 Size:    64
//   float4x4 IBLLastProxyOBB2;         // Offset:  720 Size:    64
//   float4 IBLUseLastProxyVolume;      // Offset:  784 Size:    16
//   float ForcedIBLWeight;             // Offset:  800 Size:     4
//   float AdditionalReflections;       // Offset:  804 Size:     4
//   float4x4 InvViewProjectionMatrix;  // Offset:  816 Size:    64 [unused]
//   float3 CameraWorldPos;             // Offset:  880 Size:    12
//   float3 ActorWorldPos;              // Offset:  896 Size:    12 [unused]
//   float4 ObjectWorldPositionAndRadius;// Offset:  912 Size:    16 [unused]
//   float3 ObjectOrientation;          // Offset:  928 Size:    12 [unused]
//   float3 ObjectPostProjectionPosition;// Offset:  944 Size:    12 [unused]
//   float3 ObjectNDCPosition;          // Offset:  960 Size:    12 [unused]
//   float4 ObjectMacroUVScales;        // Offset:  976 Size:    16 [unused]
//   float3 FoliageImpulseDirection;    // Offset:  992 Size:    12 [unused]
//   float4 FoliageNormalizedRotationAxisAndAngle;// Offset: 1008 Size:    16 [unused]
//   float4 WindDirectionAndSpeed;      // Offset: 1024 Size:    16 [unused]
//   float3x3 LocalToWorldMatrix;       // Offset: 1040 Size:    44 [unused]
//   float3x3 WorldToLocalMatrix;       // Offset: 1088 Size:    44 [unused]
//   float3x3 WorldToViewMatrix;        // Offset: 1136 Size:    44 [unused]
//   float3x3 ViewToWorldMatrix;        // Offset: 1184 Size:    44 [unused]
//   float4 UniformPixelVector_0;       // Offset: 1232 Size:    16
//   float4 UniformPixelVector_1;       // Offset: 1248 Size:    16 [unused]
//   float4 UniformPixelVector_2;       // Offset: 1264 Size:    16
//   float4 UniformPixelVector_3;       // Offset: 1280 Size:    16
//   float4 UniformPixelVector_4;       // Offset: 1296 Size:    16 [unused]
//   float4 UniformPixelVector_5;       // Offset: 1312 Size:    16
//   float4 UniformPixelVector_6;       // Offset: 1328 Size:    16
//   float4 UniformPixelVector_7;       // Offset: 1344 Size:    16 [unused]
//   float4 UniformPixelVector_8;       // Offset: 1360 Size:    16
//   float4 UniformPixelVector_9;       // Offset: 1376 Size:    16
//   float4 UniformPixelVector_10;      // Offset: 1392 Size:    16
//   float4 UniformPixelVector_11;      // Offset: 1408 Size:    16
//   float4 UniformPixelVector_12;      // Offset: 1424 Size:    16 [unused]
//   float4 UniformPixelScalars_0;      // Offset: 1440 Size:    16 [unused]
//   float4 UniformPixelScalars_1;      // Offset: 1456 Size:    16
//   float4 UniformPixelScalars_2;      // Offset: 1472 Size:    16
//   float4 UniformPixelScalars_3;      // Offset: 1488 Size:    16
//   float4 UniformPixelScalars_4;      // Offset: 1504 Size:    16
//   float4 UniformPixelScalars_5;      // Offset: 1520 Size:    16
//   float4 UniformPixelScalars_6;      // Offset: 1536 Size:    16
//   float3 TemporalAAParameters;       // Offset: 1552 Size:    12 [unused]
//   float4x4 PreviousLocalToWorld;     // Offset: 1568 Size:    64 [unused]
//   float LocalToWorldRotDeterminantFlip;// Offset: 1632 Size:     4 [unused]
//   float3x3 WorldToLocal;             // Offset: 1648 Size:    44 [unused]
//   float4 LightmapCoordinateScaleBias;// Offset: 1696 Size:    16 [unused]
//   float4 ShadowmapCoordinateScaleBias;// Offset: 1712 Size:    16 [unused]
//   float SubSurfaceQuality;           // Offset: 1728 Size:     4 [unused]
//   float4 DeferredRenderingParameters;// Offset: 1744 Size:    16
//   float2 TemporalAAParametersPS;     // Offset: 1760 Size:     8 [unused]
//   float3 SpotDirection;              // Offset: 1776 Size:    12 [unused]
//   float2 SpotAngles;                 // Offset: 1792 Size:     8 [unused]
//   float3 UpperSkyColor;              // Offset: 1808 Size:    12 [unused]
//   float3 LowerSkyColor;              // Offset: 1824 Size:    12 [unused]
//   float UseOnlyLightMapSpecular;     // Offset: 1836 Size:     4 [unused]
//   float4 AmbientColorAndSkyFactor;   // Offset: 1840 Size:    16
//   float4 LightMapScale[2];           // Offset: 1856 Size:    32
//   float EmissiveMultiplier;          // Offset: 1888 Size:     4
//   float DiffuseMultiplier;           // Offset: 1892 Size:     4
//
// }
//
// cbuffer PSOffsetConstants
// {
//
//   float4 ScreenPositionScaleBias;    // Offset:    0 Size:    16 [unused]
//   float4 MinZ_MaxZRatio;             // Offset:   16 Size:    16 [unused]
//   float NvStereoEnabled;             // Offset:   32 Size:     4 [unused]
//   float4 DiffuseOverrideParameter;   // Offset:   48 Size:    16
//   float4 SpecularOverrideParameter;  // Offset:   64 Size:    16
//   float4 CameraPositionPS;           // Offset:   80 Size:    16 [unused]
//   float4 ScreenAndTexelSize;         // Offset:   96 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// LightMapTexturesSampler[0]        sampler      NA          NA    0        1
// LightMapTexturesSampler[1]        sampler      NA          NA    1        1
// AmbientReflectionCubemapSampler    sampler      NA          NA    2        1
// ForcedIBLCubemapSampler           sampler      NA          NA    3        1
// PixelTexture2D_0Sampler           sampler      NA          NA    4        1
// PixelTexture2D_1Sampler           sampler      NA          NA    5        1
// PixelTexture2D_2Sampler           sampler      NA          NA    6        1
// PixelTexture2D_3Sampler           sampler      NA          NA    7        1
// PixelTexture2D_4Sampler           sampler      NA          NA    8        1
// AmbientReflectionCubemap          texture  float4        cube    0        1
// ForcedIBLCubemap                  texture  float4        cube    1        1
// PixelTexture2D_0                  texture  float4          2d    2        1
// PixelTexture2D_1                  texture  float4          2d    3        1
// PixelTexture2D_2                  texture  float4          2d    4        1
// PixelTexture2D_3                  texture  float4          2d    5        1
// PixelTexture2D_4                  texture  float4          2d    6        1
// LightMapTextures[0]               texture  float4          2d    7        1
// LightMapTextures[1]               texture  float4          2d    8        1
// $Globals                          cbuffer      NA          NA    0        1
// PSOffsetConstants                 cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float   xyz 
// TEXCOORD                11   xyzw        1     NONE   float   xyzw
// COLOR                    0   xyzw        2     NONE   float       
// TEXCOORD                 0   xy          3     NONE   float   xy  
// TEXCOORD                 1   xyzw        4     NONE   float   xy  
// TEXCOORD                 6   xyzw        5     NONE   float   xyz 
// TEXCOORD                 7   xyz         6     NONE   float       
// TEXCOORD                 5   xyzw        7     NONE   float   xyz 
// SV_IsFrontFace           0   x           8    FFACE    uint       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xyzw        1   TARGET   float   xyzw
// SV_Target                2   xyzw        2   TARGET   float   xyzw
// SV_Target                3   xyzw        3   TARGET   float   xyzw
// SV_Target                4   xyzw        4   TARGET   float   xyzw
// SV_Target                5   xyzw        5   TARGET   float   xyzw
// SV_Target                6   xyzw        6   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[119], immediateIndexed
dcl_constantbuffer cb2[5], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
dcl_sampler s8, mode_default
dcl_resource_texturecube (float,float,float,float) t0
dcl_resource_texturecube (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_input_ps linear centroid v0.xyz
dcl_input_ps linear centroid v1.xyzw
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.xy
dcl_input_ps linear v5.xyz
dcl_input_ps linear v7.xyz
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_temps 16
dp3 r0.x, v1.xyzx, v1.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v1.xyzx
dp3 r0.w, v0.xyzx, v0.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, v0.xyzx
mul r2.xyz, r0.zxyz, r1.yzxy
mad r2.xyz, r0.yzxy, r1.zxyz, -r2.xyzx
mul r2.xyz, r2.xyzx, v1.wwww
add r3.xyz, v7.xyzx, cb0[55].xyzx
dp3 r0.w, v5.xyzx, v5.xyzx
rsq r0.w, r0.w
mul r4.xyz, r0.wwww, v5.xyzx
sample_b_indexable(texture2d)(float,float,float,float) r5.xyz, v4.xyxx, t2.xyzw, s4, l(0.000000)
mad r5.xyz, r5.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
mul r6.xy, v4.xyxx, cb0[80].xyxx
sample_b_indexable(texture2d)(float,float,float,float) r6.xyz, r6.xyxx, t3.xyzw, s5, l(0.000000)
mad r6.xyz, r6.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
mul r6.xyz, r6.xyzx, cb0[82].xyzx
mul r7.xy, v4.xyxx, cb0[83].xyxx
sample_b_indexable(texture2d)(float,float,float,float) r7.xyz, r7.xyxx, t4.xyzw, s6, l(0.000000)
mad r7.xyz, r7.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
sample_b_indexable(texture2d)(float,float,float,float) r8.xy, v4.xyxx, t5.xyzw, s7, l(0.000000)
mul_sat r0.w, r8.x, cb0[91].w
lt r1.w, r0.w, l(0.000001)
log r0.w, r0.w
mul r0.w, r0.w, cb0[92].x
exp r0.w, r0.w
movc r0.w, r1.w, l(0), r0.w
mad r7.xyz, r7.xyzx, cb0[85].xyzx, -r6.xyzx
mad r6.xyz, r0.wwww, r7.xyzx, r6.xyzx
mul_sat r1.w, r8.y, cb0[92].y
lt r2.w, r1.w, l(0.000001)
log r1.w, r1.w
mul r1.w, r1.w, cb0[92].z
exp r1.w, r1.w
movc r1.w, r2.w, l(0), r1.w
add r7.xyz, -r6.xyzx, l(0.000000, 0.000000, 0.000100, 0.000000)
mad r6.xyz, r1.wwww, r7.xyzx, r6.xyzx
mad r5.xyz, r5.xyzx, cb0[79].xyzx, r6.xyzx
dp3 r2.w, r5.xyzx, r5.xyzx
sqrt r2.w, r2.w
div r5.xyz, r5.xyzx, r2.wwww
dp3 r2.w, r5.xyzx, r5.xyzx
rsq r2.w, r2.w
mul r5.xyz, r2.wwww, r5.xyzx
add r6.xyz, -cb0[77].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
sample_b_indexable(texture2d)(float,float,float,float) r7.xyz, v4.xyxx, t6.xyzw, s8, l(0.000000)
max r7.xyz, |r7.xyzx|, l(0.000001, 0.000001, 0.000001, 0.000000)
log r7.xyz, r7.xyzx
mul r7.xyz, r7.xyzx, cb0[92].wwww
exp r7.xyz, r7.xyzx
add r8.xyz, -cb0[86].xyzx, cb0[87].xyzx
mad r8.xyz, r0.wwww, r8.xyzx, cb0[86].xyzx
add r9.xyz, -r8.xyzx, cb0[88].xyzx
mad r8.xyz, r1.wwww, r9.xyzx, r8.xyzx
mul r7.xyz, r7.xyzx, r8.xyzx
mul r6.xyz, r6.xyzx, r7.xyzx
mad r6.xyz, r6.xyzx, cb2[3].wwww, cb2[3].xyzx
mul r7.xyz, r6.xyzx, cb0[118].yyyy
add r2.w, -cb0[93].y, cb0[93].x
mad r2.w, r0.w, r2.w, cb0[93].y
add r3.w, -r2.w, cb0[93].z
mad r2.w, r1.w, r3.w, r2.w
mad r8.xyz, r2.wwww, cb2[4].wwww, cb2[4].xyzx
add r9.xy, -cb0[94].ywyy, cb0[94].xxxx
mad r2.w, cb0[93].w, r9.x, cb0[94].y
mad r3.w, cb0[94].z, r9.y, cb0[94].w
add r3.w, -r2.w, r3.w
mad r2.w, r0.w, r3.w, r2.w
add r3.w, cb0[94].x, -cb0[95].y
mad r3.w, cb0[95].x, r3.w, cb0[95].y
add r3.w, -r2.w, r3.w
mad r2.w, r1.w, r3.w, r2.w
add r3.w, -cb0[95].w, cb0[95].z
mad r0.w, r0.w, r3.w, cb0[95].w
add r3.w, -r0.w, cb0[96].x
mad r0.w, r1.w, r3.w, r0.w
mul r9.xyz, r8.xyzx, l(0.080000, 0.080000, 0.080000, 0.000000)
mad r6.xyz, r6.xyzx, cb0[118].yyyy, -r9.xyzx
mad r6.xyz, r0.wwww, r6.xyzx, r9.xyzx
add_sat r1.w, r8.x, r8.x
add r1.w, r1.w, l(-1.000000)
mad r1.w, r0.w, r1.w, l(1.000000)
mul r6.xyz, r1.wwww, r6.xyzx
mad r7.xyz, -r7.xyzx, r0.wwww, r7.xyzx
dp2_sat r9.x, r5.yzyy, l(0.816496611, 0.577350259, 0.000000, 0.000000)
dp3_sat r9.y, r5.zxyz, l(0.577350259, -0.707106769, -0.408248305, 0.000000)
dp3_sat r9.z, r5.xyzx, l(0.707106769, -0.408248305, 0.577350259, 0.000000)
mul r9.xyz, r9.xyzx, r9.xyzx
sample_indexable(texture2d)(float,float,float,float) r10.xyz, v3.xyxx, t7.xyzw, s0
mul r10.xyz, r10.xyzx, cb0[116].xyzx
sample_indexable(texture2d)(float,float,float,float) r11.xyz, v3.xyxx, t8.xyzw, s1
mul r11.xyz, r11.xyzx, cb0[117].xyzx
dp3 r0.w, r11.xyzx, r9.xyzx
mul r9.xyz, r0.wwww, r10.xyzx
mul r10.xyz, r7.xyzx, r9.xyzx
mad r10.xyz, cb0[77].xyzx, cb0[118].xxxx, r10.xyzx
dp3 r0.w, r9.xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
dp3 r1.w, v7.xyzx, v7.xyzx
rsq r1.w, r1.w
mul r9.xyz, r1.wwww, v7.xyzx
dp3 r1.x, r1.xyzx, r5.xyzx
dp3 r1.y, r2.xyzx, r5.xyzx
dp3 r1.z, r0.xyzx, r5.xyzx
dp3 r0.x, r9.xyzx, r1.xyzx
add r0.x, r0.x, r0.x
mad r0.xyz, r1.xyzx, -r0.xxxx, r9.xyzx
log r1.w, r2.w
mad r1.w, -r1.w, l(1.200000), l(1.000000)
add r1.w, -r1.w, l(6.000000)
ne r2.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[36].xyzx
or r3.w, r2.y, r2.x
or r3.w, r2.z, r3.w
if_nz r3.w
  ne r4.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[20].w
  if_nz r4.w
    mul r9.xyz, r0.yyyy, cb0[25].xyzx
    mad r9.xyz, cb0[24].xyzx, r0.xxxx, r9.xyzx
    mad r9.xyz, cb0[26].xyzx, r0.zzzz, r9.xyzx
    mul r11.xyz, r3.yyyy, cb0[25].xyzx
    mad r11.xyz, cb0[24].xyzx, r3.xxxx, r11.xyzx
    mad r11.xyz, cb0[26].xyzx, r3.zzzz, r11.xyzx
    add r11.xyz, r11.xyzx, cb0[27].xyzx
    add r12.xyz, -r11.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r12.xyz, r12.xyzx, r9.xyzx
    add r11.xyz, -r11.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r9.xyz, r11.xyzx, r9.xyzx
    max r9.xyz, r9.xyzx, r12.xyzx
    min r4.w, r9.z, r9.y
    min r4.w, r4.w, r9.x
    and r4.w, r2.x, r4.w
    mul r9.xyz, r0.yyyy, cb0[29].xyzx
    mad r9.xyz, cb0[28].xyzx, r0.xxxx, r9.xyzx
    mad r9.xyz, cb0[30].xyzx, r0.zzzz, r9.xyzx
    mul r11.xyz, r3.yyyy, cb0[29].xyzx
    mad r11.xyz, cb0[28].xyzx, r3.xxxx, r11.xyzx
    mad r11.xyz, cb0[30].xyzx, r3.zzzz, r11.xyzx
    add r11.xyz, r11.xyzx, cb0[31].xyzx
    add r12.xyz, -r11.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r12.xyz, r12.xyzx, r9.xyzx
    add r11.xyz, -r11.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r9.xyz, r11.xyzx, r9.xyzx
    max r9.xyz, r9.xyzx, r12.xyzx
    min r5.w, r9.z, r9.y
    min r5.w, r5.w, r9.x
    and r5.w, r2.y, r5.w
    mul r9.xyz, r0.yyyy, cb0[33].xyzx
    mad r9.xyz, cb0[32].xyzx, r0.xxxx, r9.xyzx
    mad r9.xyz, cb0[34].xyzx, r0.zzzz, r9.xyzx
    mul r11.xyz, r3.yyyy, cb0[33].xyzx
    mad r11.xyz, cb0[32].xyzx, r3.xxxx, r11.xyzx
    mad r11.xyz, cb0[34].xyzx, r3.zzzz, r11.xyzx
    add r11.xyz, r11.xyzx, cb0[35].xyzx
    add r12.xyz, -r11.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r12.xyz, r12.xyzx, r9.xyzx
    add r11.xyz, -r11.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r9.xyz, r11.xyzx, r9.xyzx
    max r9.xyz, r9.xyzx, r12.xyzx
    min r6.w, r9.z, r9.y
    min r6.w, r6.w, r9.x
    and r6.w, r2.z, r6.w
    max r4.w, r4.w, r5.w
    max r4.w, r6.w, r4.w
    mad r9.xyz, r0.xyzx, r4.wwww, r3.xyzx
    add r9.xyz, r9.xyzx, -cb0[20].xyzx
    movc r9.xyz, r3.wwww, r9.xyzx, r0.xyzx
    dp3 r4.w, r9.xyzx, r9.xyzx
    rsq r4.w, r4.w
    mul r9.xyz, r4.wwww, r9.xyzx
    sample_l_indexable(texturecube)(float,float,float,float) r9.xyz, r9.xyzx, t0.xyzw, s2, r1.w
    ne r4.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].w
    if_nz r4.w
      ne r11.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].xyzx
      or r4.w, r11.y, r11.x
      or r4.w, r11.z, r4.w
      mul r12.xyz, r0.yyyy, cb0[38].xyzx
      mad r12.xyz, cb0[37].xyzx, r0.xxxx, r12.xyzx
      mad r12.xyz, cb0[39].xyzx, r0.zzzz, r12.xyzx
      mul r13.xyz, r3.yyyy, cb0[38].xyzx
      mad r13.xyz, cb0[37].xyzx, r3.xxxx, r13.xyzx
      mad r13.xyz, cb0[39].xyzx, r3.zzzz, r13.xyzx
      add r13.xyz, r13.xyzx, cb0[40].xyzx
      add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r14.xyz, r14.xyzx, r12.xyzx
      add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r12.xyz, r13.xyzx, r12.xyzx
      max r12.xyz, r12.xyzx, r14.xyzx
      min r5.w, r12.z, r12.y
      min r5.w, r5.w, r12.x
      and r5.w, r5.w, r11.x
      mul r12.xyz, r0.yyyy, cb0[42].xyzx
      mad r12.xyz, cb0[41].xyzx, r0.xxxx, r12.xyzx
      mad r12.xyz, cb0[43].xyzx, r0.zzzz, r12.xyzx
      mul r13.xyz, r3.yyyy, cb0[42].xyzx
      mad r13.xyz, cb0[41].xyzx, r3.xxxx, r13.xyzx
      mad r13.xyz, cb0[43].xyzx, r3.zzzz, r13.xyzx
      add r13.xyz, r13.xyzx, cb0[44].xyzx
      add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r14.xyz, r14.xyzx, r12.xyzx
      add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r12.xyz, r13.xyzx, r12.xyzx
      max r12.xyz, r12.xyzx, r14.xyzx
      min r6.w, r12.z, r12.y
      min r6.w, r6.w, r12.x
      and r6.w, r6.w, r11.y
      mul r11.xyw, r0.yyyy, cb0[46].xyxz
      mad r11.xyw, cb0[45].xyxz, r0.xxxx, r11.xyxw
      mad r11.xyw, cb0[47].xyxz, r0.zzzz, r11.xyxw
      mul r12.xyz, r3.yyyy, cb0[46].xyzx
      mad r12.xyz, cb0[45].xyzx, r3.xxxx, r12.xyzx
      mad r12.xyz, cb0[47].xyzx, r3.zzzz, r12.xyzx
      add r12.xyz, r12.xyzx, cb0[48].xyzx
      add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r13.xyz, r13.xyzx, r11.xywx
      add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r11.xyw, r12.xyxz, r11.xyxw
      max r11.xyw, r11.xyxw, r13.xyxz
      min r7.w, r11.w, r11.y
      min r7.w, r7.w, r11.x
      and r7.w, r7.w, r11.z
      max r5.w, r5.w, r6.w
      max r5.w, r7.w, r5.w
      mad r11.xyz, r0.xyzx, r5.wwww, r3.xyzx
      add r11.xyz, r11.xyzx, -cb0[20].xyzx
      movc r11.xyz, r4.wwww, r11.xyzx, r0.xyzx
      dp3 r4.w, r11.xyzx, r11.xyzx
      rsq r4.w, r4.w
      mul r11.xyz, r4.wwww, r11.xyzx
      sample_l_indexable(texturecube)(float,float,float,float) r11.xyz, r11.xyzx, t0.xyzw, s2, r1.w
      add r11.xyz, -r9.xyzx, r11.xyzx
      mad r9.xyz, cb0[49].wwww, r11.xyzx, r9.xyzx
    endif 
    mul r9.xyz, r9.xyzx, cb0[20].wwww
  else 
    mov r9.xyz, l(0,0,0,0)
  endif 
  ne r4.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[21].w
  if_nz r4.w
    mul r11.xyz, r0.yyyy, cb0[25].xyzx
    mad r11.xyz, cb0[24].xyzx, r0.xxxx, r11.xyzx
    mad r11.xyz, cb0[26].xyzx, r0.zzzz, r11.xyzx
    mul r12.xyz, r3.yyyy, cb0[25].xyzx
    mad r12.xyz, cb0[24].xyzx, r3.xxxx, r12.xyzx
    mad r12.xyz, cb0[26].xyzx, r3.zzzz, r12.xyzx
    add r12.xyz, r12.xyzx, cb0[27].xyzx
    add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r13.xyz, r13.xyzx, r11.xyzx
    add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r11.xyz, r12.xyzx, r11.xyzx
    max r11.xyz, r11.xyzx, r13.xyzx
    min r4.w, r11.z, r11.y
    min r4.w, r4.w, r11.x
    and r4.w, r2.x, r4.w
    mul r11.xyz, r0.yyyy, cb0[29].xyzx
    mad r11.xyz, cb0[28].xyzx, r0.xxxx, r11.xyzx
    mad r11.xyz, cb0[30].xyzx, r0.zzzz, r11.xyzx
    mul r12.xyz, r3.yyyy, cb0[29].xyzx
    mad r12.xyz, cb0[28].xyzx, r3.xxxx, r12.xyzx
    mad r12.xyz, cb0[30].xyzx, r3.zzzz, r12.xyzx
    add r12.xyz, r12.xyzx, cb0[31].xyzx
    add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r13.xyz, r13.xyzx, r11.xyzx
    add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r11.xyz, r12.xyzx, r11.xyzx
    max r11.xyz, r11.xyzx, r13.xyzx
    min r5.w, r11.z, r11.y
    min r5.w, r5.w, r11.x
    and r5.w, r2.y, r5.w
    mul r11.xyz, r0.yyyy, cb0[33].xyzx
    mad r11.xyz, cb0[32].xyzx, r0.xxxx, r11.xyzx
    mad r11.xyz, cb0[34].xyzx, r0.zzzz, r11.xyzx
    mul r12.xyz, r3.yyyy, cb0[33].xyzx
    mad r12.xyz, cb0[32].xyzx, r3.xxxx, r12.xyzx
    mad r12.xyz, cb0[34].xyzx, r3.zzzz, r12.xyzx
    add r12.xyz, r12.xyzx, cb0[35].xyzx
    add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r13.xyz, r13.xyzx, r11.xyzx
    add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r11.xyz, r12.xyzx, r11.xyzx
    max r11.xyz, r11.xyzx, r13.xyzx
    min r6.w, r11.z, r11.y
    min r6.w, r6.w, r11.x
    and r6.w, r2.z, r6.w
    max r4.w, r4.w, r5.w
    max r4.w, r6.w, r4.w
    mad r11.xyz, r0.xyzx, r4.wwww, r3.xyzx
    add r11.xyz, r11.xyzx, -cb0[21].xyzx
    movc r11.xyz, r3.wwww, r11.xyzx, r0.xyzx
    dp3 r4.w, r11.xyzx, r11.xyzx
    rsq r4.w, r4.w
    mul r11.xyz, r4.wwww, r11.xyzx
    sample_l_indexable(texturecube)(float,float,float,float) r11.xyz, r11.xyzx, t0.xyzw, s2, r1.w
    ne r4.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].w
    if_nz r4.w
      ne r12.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].xyzx
      or r4.w, r12.y, r12.x
      or r4.w, r12.z, r4.w
      mul r13.xyz, r0.yyyy, cb0[38].xyzx
      mad r13.xyz, cb0[37].xyzx, r0.xxxx, r13.xyzx
      mad r13.xyz, cb0[39].xyzx, r0.zzzz, r13.xyzx
      mul r14.xyz, r3.yyyy, cb0[38].xyzx
      mad r14.xyz, cb0[37].xyzx, r3.xxxx, r14.xyzx
      mad r14.xyz, cb0[39].xyzx, r3.zzzz, r14.xyzx
      add r14.xyz, r14.xyzx, cb0[40].xyzx
      add r15.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r15.xyz, r15.xyzx, r13.xyzx
      add r14.xyz, -r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r13.xyz, r14.xyzx, r13.xyzx
      max r13.xyz, r13.xyzx, r15.xyzx
      min r5.w, r13.z, r13.y
      min r5.w, r5.w, r13.x
      and r5.w, r5.w, r12.x
      mul r13.xyz, r0.yyyy, cb0[42].xyzx
      mad r13.xyz, cb0[41].xyzx, r0.xxxx, r13.xyzx
      mad r13.xyz, cb0[43].xyzx, r0.zzzz, r13.xyzx
      mul r14.xyz, r3.yyyy, cb0[42].xyzx
      mad r14.xyz, cb0[41].xyzx, r3.xxxx, r14.xyzx
      mad r14.xyz, cb0[43].xyzx, r3.zzzz, r14.xyzx
      add r14.xyz, r14.xyzx, cb0[44].xyzx
      add r15.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r15.xyz, r15.xyzx, r13.xyzx
      add r14.xyz, -r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r13.xyz, r14.xyzx, r13.xyzx
      max r13.xyz, r13.xyzx, r15.xyzx
      min r6.w, r13.z, r13.y
      min r6.w, r6.w, r13.x
      and r6.w, r6.w, r12.y
      mul r12.xyw, r0.yyyy, cb0[46].xyxz
      mad r12.xyw, cb0[45].xyxz, r0.xxxx, r12.xyxw
      mad r12.xyw, cb0[47].xyxz, r0.zzzz, r12.xyxw
      mul r13.xyz, r3.yyyy, cb0[46].xyzx
      mad r13.xyz, cb0[45].xyzx, r3.xxxx, r13.xyzx
      mad r13.xyz, cb0[47].xyzx, r3.zzzz, r13.xyzx
      add r13.xyz, r13.xyzx, cb0[48].xyzx
      add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r14.xyz, r14.xyzx, r12.xywx
      add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r12.xyw, r13.xyxz, r12.xyxw
      max r12.xyw, r12.xyxw, r14.xyxz
      min r7.w, r12.w, r12.y
      min r7.w, r7.w, r12.x
      and r7.w, r7.w, r12.z
      max r5.w, r5.w, r6.w
      max r5.w, r7.w, r5.w
      mad r12.xyz, r0.xyzx, r5.wwww, r3.xyzx
      add r12.xyz, r12.xyzx, -cb0[21].xyzx
      movc r12.xyz, r4.wwww, r12.xyzx, r0.xyzx
      dp3 r4.w, r12.xyzx, r12.xyzx
      rsq r4.w, r4.w
      mul r12.xyz, r4.wwww, r12.xyzx
      sample_l_indexable(texturecube)(float,float,float,float) r12.xyz, r12.xyzx, t0.xyzw, s2, r1.w
      add r12.xyz, -r11.xyzx, r12.xyzx
      mad r11.xyz, cb0[49].wwww, r12.xyzx, r11.xyzx
    endif 
    mad r9.xyz, r11.xyzx, cb0[21].wwww, r9.xyzx
  endif 
  ne r4.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[22].w
  if_nz r4.w
    mul r11.xyz, r0.yyyy, cb0[25].xyzx
    mad r11.xyz, cb0[24].xyzx, r0.xxxx, r11.xyzx
    mad r11.xyz, cb0[26].xyzx, r0.zzzz, r11.xyzx
    mul r12.xyz, r3.yyyy, cb0[25].xyzx
    mad r12.xyz, cb0[24].xyzx, r3.xxxx, r12.xyzx
    mad r12.xyz, cb0[26].xyzx, r3.zzzz, r12.xyzx
    add r12.xyz, r12.xyzx, cb0[27].xyzx
    add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r13.xyz, r13.xyzx, r11.xyzx
    add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r11.xyz, r12.xyzx, r11.xyzx
    max r11.xyz, r11.xyzx, r13.xyzx
    min r4.w, r11.z, r11.y
    min r4.w, r4.w, r11.x
    and r4.w, r2.x, r4.w
    mul r11.xyz, r0.yyyy, cb0[29].xyzx
    mad r11.xyz, cb0[28].xyzx, r0.xxxx, r11.xyzx
    mad r11.xyz, cb0[30].xyzx, r0.zzzz, r11.xyzx
    mul r12.xyz, r3.yyyy, cb0[29].xyzx
    mad r12.xyz, cb0[28].xyzx, r3.xxxx, r12.xyzx
    mad r12.xyz, cb0[30].xyzx, r3.zzzz, r12.xyzx
    add r12.xyz, r12.xyzx, cb0[31].xyzx
    add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r13.xyz, r13.xyzx, r11.xyzx
    add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r11.xyz, r12.xyzx, r11.xyzx
    max r11.xyz, r11.xyzx, r13.xyzx
    min r5.w, r11.z, r11.y
    min r5.w, r5.w, r11.x
    and r5.w, r2.y, r5.w
    mul r11.xyz, r0.yyyy, cb0[33].xyzx
    mad r11.xyz, cb0[32].xyzx, r0.xxxx, r11.xyzx
    mad r11.xyz, cb0[34].xyzx, r0.zzzz, r11.xyzx
    mul r12.xyz, r3.yyyy, cb0[33].xyzx
    mad r12.xyz, cb0[32].xyzx, r3.xxxx, r12.xyzx
    mad r12.xyz, cb0[34].xyzx, r3.zzzz, r12.xyzx
    add r12.xyz, r12.xyzx, cb0[35].xyzx
    add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r13.xyz, r13.xyzx, r11.xyzx
    add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r11.xyz, r12.xyzx, r11.xyzx
    max r11.xyz, r11.xyzx, r13.xyzx
    min r6.w, r11.z, r11.y
    min r6.w, r6.w, r11.x
    and r6.w, r2.z, r6.w
    max r4.w, r4.w, r5.w
    max r4.w, r6.w, r4.w
    mad r11.xyz, r0.xyzx, r4.wwww, r3.xyzx
    add r11.xyz, r11.xyzx, -cb0[22].xyzx
    movc r11.xyz, r3.wwww, r11.xyzx, r0.xyzx
    dp3 r4.w, r11.xyzx, r11.xyzx
    rsq r4.w, r4.w
    mul r11.xyz, r4.wwww, r11.xyzx
    sample_l_indexable(texturecube)(float,float,float,float) r11.xyz, r11.xyzx, t0.xyzw, s2, r1.w
    ne r4.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].w
    if_nz r4.w
      ne r12.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].xyzx
      or r4.w, r12.y, r12.x
      or r4.w, r12.z, r4.w
      mul r13.xyz, r0.yyyy, cb0[38].xyzx
      mad r13.xyz, cb0[37].xyzx, r0.xxxx, r13.xyzx
      mad r13.xyz, cb0[39].xyzx, r0.zzzz, r13.xyzx
      mul r14.xyz, r3.yyyy, cb0[38].xyzx
      mad r14.xyz, cb0[37].xyzx, r3.xxxx, r14.xyzx
      mad r14.xyz, cb0[39].xyzx, r3.zzzz, r14.xyzx
      add r14.xyz, r14.xyzx, cb0[40].xyzx
      add r15.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r15.xyz, r15.xyzx, r13.xyzx
      add r14.xyz, -r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r13.xyz, r14.xyzx, r13.xyzx
      max r13.xyz, r13.xyzx, r15.xyzx
      min r5.w, r13.z, r13.y
      min r5.w, r5.w, r13.x
      and r5.w, r5.w, r12.x
      mul r13.xyz, r0.yyyy, cb0[42].xyzx
      mad r13.xyz, cb0[41].xyzx, r0.xxxx, r13.xyzx
      mad r13.xyz, cb0[43].xyzx, r0.zzzz, r13.xyzx
      mul r14.xyz, r3.yyyy, cb0[42].xyzx
      mad r14.xyz, cb0[41].xyzx, r3.xxxx, r14.xyzx
      mad r14.xyz, cb0[43].xyzx, r3.zzzz, r14.xyzx
      add r14.xyz, r14.xyzx, cb0[44].xyzx
      add r15.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r15.xyz, r15.xyzx, r13.xyzx
      add r14.xyz, -r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r13.xyz, r14.xyzx, r13.xyzx
      max r13.xyz, r13.xyzx, r15.xyzx
      min r6.w, r13.z, r13.y
      min r6.w, r6.w, r13.x
      and r6.w, r6.w, r12.y
      mul r12.xyw, r0.yyyy, cb0[46].xyxz
      mad r12.xyw, cb0[45].xyxz, r0.xxxx, r12.xyxw
      mad r12.xyw, cb0[47].xyxz, r0.zzzz, r12.xyxw
      mul r13.xyz, r3.yyyy, cb0[46].xyzx
      mad r13.xyz, cb0[45].xyzx, r3.xxxx, r13.xyzx
      mad r13.xyz, cb0[47].xyzx, r3.zzzz, r13.xyzx
      add r13.xyz, r13.xyzx, cb0[48].xyzx
      add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r14.xyz, r14.xyzx, r12.xywx
      add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r12.xyw, r13.xyxz, r12.xyxw
      max r12.xyw, r12.xyxw, r14.xyxz
      min r7.w, r12.w, r12.y
      min r7.w, r7.w, r12.x
      and r7.w, r7.w, r12.z
      max r5.w, r5.w, r6.w
      max r5.w, r7.w, r5.w
      mad r12.xyz, r0.xyzx, r5.wwww, r3.xyzx
      add r12.xyz, r12.xyzx, -cb0[22].xyzx
      movc r12.xyz, r4.wwww, r12.xyzx, r0.xyzx
      dp3 r4.w, r12.xyzx, r12.xyzx
      rsq r4.w, r4.w
      mul r12.xyz, r4.wwww, r12.xyzx
      sample_l_indexable(texturecube)(float,float,float,float) r12.xyz, r12.xyzx, t0.xyzw, s2, r1.w
      add r12.xyz, -r11.xyzx, r12.xyzx
      mad r11.xyz, cb0[49].wwww, r12.xyzx, r11.xyzx
    endif 
    mad r9.xyz, r11.xyzx, cb0[22].wwww, r9.xyzx
  endif 
  ne r4.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[23].w
  if_nz r4.w
    mul r11.xyz, r0.yyyy, cb0[25].xyzx
    mad r11.xyz, cb0[24].xyzx, r0.xxxx, r11.xyzx
    mad r11.xyz, cb0[26].xyzx, r0.zzzz, r11.xyzx
    mul r12.xyz, r3.yyyy, cb0[25].xyzx
    mad r12.xyz, cb0[24].xyzx, r3.xxxx, r12.xyzx
    mad r12.xyz, cb0[26].xyzx, r3.zzzz, r12.xyzx
    add r12.xyz, r12.xyzx, cb0[27].xyzx
    add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r13.xyz, r13.xyzx, r11.xyzx
    add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r11.xyz, r12.xyzx, r11.xyzx
    max r11.xyz, r11.xyzx, r13.xyzx
    min r4.w, r11.z, r11.y
    min r4.w, r4.w, r11.x
    and r2.x, r2.x, r4.w
    mul r11.xyz, r0.yyyy, cb0[29].xyzx
    mad r11.xyz, cb0[28].xyzx, r0.xxxx, r11.xyzx
    mad r11.xyz, cb0[30].xyzx, r0.zzzz, r11.xyzx
    mul r12.xyz, r3.yyyy, cb0[29].xyzx
    mad r12.xyz, cb0[28].xyzx, r3.xxxx, r12.xyzx
    mad r12.xyz, cb0[30].xyzx, r3.zzzz, r12.xyzx
    add r12.xyz, r12.xyzx, cb0[31].xyzx
    add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r13.xyz, r13.xyzx, r11.xyzx
    add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r11.xyz, r12.xyzx, r11.xyzx
    max r11.xyz, r11.xyzx, r13.xyzx
    min r4.w, r11.z, r11.y
    min r4.w, r4.w, r11.x
    and r2.y, r2.y, r4.w
    mul r11.xyz, r0.yyyy, cb0[33].xyzx
    mad r11.xyz, cb0[32].xyzx, r0.xxxx, r11.xyzx
    mad r11.xyz, cb0[34].xyzx, r0.zzzz, r11.xyzx
    mul r12.xyz, r3.yyyy, cb0[33].xyzx
    mad r12.xyz, cb0[32].xyzx, r3.xxxx, r12.xyzx
    mad r12.xyz, cb0[34].xyzx, r3.zzzz, r12.xyzx
    add r12.xyz, r12.xyzx, cb0[35].xyzx
    add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r13.xyz, r13.xyzx, r11.xyzx
    add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r11.xyz, r12.xyzx, r11.xyzx
    max r11.xyz, r11.xyzx, r13.xyzx
    min r4.w, r11.z, r11.y
    min r4.w, r4.w, r11.x
    and r2.z, r2.z, r4.w
    max r2.x, r2.y, r2.x
    max r2.x, r2.z, r2.x
    mad r2.xyz, r0.xyzx, r2.xxxx, r3.xyzx
    add r2.xyz, r2.xyzx, -cb0[23].xyzx
    movc r2.xyz, r3.wwww, r2.xyzx, r0.xyzx
    dp3 r3.w, r2.xyzx, r2.xyzx
    rsq r3.w, r3.w
    mul r2.xyz, r2.xyzx, r3.wwww
    sample_l_indexable(texturecube)(float,float,float,float) r2.xyz, r2.xyzx, t0.xyzw, s2, r1.w
    ne r3.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].w
    if_nz r3.w
      ne r11.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].xyzx
      or r3.w, r11.y, r11.x
      or r3.w, r11.z, r3.w
      mul r12.xyz, r0.yyyy, cb0[38].xyzx
      mad r12.xyz, cb0[37].xyzx, r0.xxxx, r12.xyzx
      mad r12.xyz, cb0[39].xyzx, r0.zzzz, r12.xyzx
      mul r13.xyz, r3.yyyy, cb0[38].xyzx
      mad r13.xyz, cb0[37].xyzx, r3.xxxx, r13.xyzx
      mad r13.xyz, cb0[39].xyzx, r3.zzzz, r13.xyzx
      add r13.xyz, r13.xyzx, cb0[40].xyzx
      add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r14.xyz, r14.xyzx, r12.xyzx
      add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r12.xyz, r13.xyzx, r12.xyzx
      max r12.xyz, r12.xyzx, r14.xyzx
      min r4.w, r12.z, r12.y
      min r4.w, r4.w, r12.x
      and r4.w, r4.w, r11.x
      mul r12.xyz, r0.yyyy, cb0[42].xyzx
      mad r12.xyz, cb0[41].xyzx, r0.xxxx, r12.xyzx
      mad r12.xyz, cb0[43].xyzx, r0.zzzz, r12.xyzx
      mul r13.xyz, r3.yyyy, cb0[42].xyzx
      mad r13.xyz, cb0[41].xyzx, r3.xxxx, r13.xyzx
      mad r13.xyz, cb0[43].xyzx, r3.zzzz, r13.xyzx
      add r13.xyz, r13.xyzx, cb0[44].xyzx
      add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r14.xyz, r14.xyzx, r12.xyzx
      add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r12.xyz, r13.xyzx, r12.xyzx
      max r12.xyz, r12.xyzx, r14.xyzx
      min r5.w, r12.z, r12.y
      min r5.w, r5.w, r12.x
      and r5.w, r5.w, r11.y
      mul r11.xyw, r0.yyyy, cb0[46].xyxz
      mad r11.xyw, cb0[45].xyxz, r0.xxxx, r11.xyxw
      mad r11.xyw, cb0[47].xyxz, r0.zzzz, r11.xyxw
      mul r12.xyz, r3.yyyy, cb0[46].xyzx
      mad r12.xyz, cb0[45].xyzx, r3.xxxx, r12.xyzx
      mad r12.xyz, cb0[47].xyzx, r3.zzzz, r12.xyzx
      add r12.xyz, r12.xyzx, cb0[48].xyzx
      add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      div r13.xyz, r13.xyzx, r11.xywx
      add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
      div r11.xyw, r12.xyxz, r11.xyxw
      max r11.xyw, r11.xyxw, r13.xyxz
      min r6.w, r11.w, r11.y
      min r6.w, r6.w, r11.x
      and r6.w, r6.w, r11.z
      max r4.w, r4.w, r5.w
      max r4.w, r6.w, r4.w
      mad r11.xyz, r0.xyzx, r4.wwww, r3.xyzx
      add r11.xyz, r11.xyzx, -cb0[23].xyzx
      movc r11.xyz, r3.wwww, r11.xyzx, r0.xyzx
      dp3 r3.w, r11.xyzx, r11.xyzx
      rsq r3.w, r3.w
      mul r11.xyz, r3.wwww, r11.xyzx
      sample_l_indexable(texturecube)(float,float,float,float) r11.xyz, r11.xyzx, t0.xyzw, s2, r1.w
      add r11.xyz, -r2.xyzx, r11.xyzx
      mad r2.xyz, cb0[49].wwww, r11.xyzx, r2.xyzx
    endif 
    mad r9.xyz, r2.xyzx, cb0[23].wwww, r9.xyzx
  endif 
else 
  sample_l_indexable(texturecube)(float,float,float,float) r9.xyz, r0.xyzx, t0.xyzw, s2, r1.w
  ne r2.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].w
  if_nz r2.x
    ne r2.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[20].w
    if_nz r2.x
      dp3 r2.x, r0.xyzx, r0.xyzx
      rsq r2.x, r2.x
      mul r2.xyz, r0.xyzx, r2.xxxx
      sample_l_indexable(texturecube)(float,float,float,float) r2.xyz, r2.xyzx, t0.xyzw, s2, r1.w
      ne r3.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].w
      if_nz r3.w
        ne r11.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].xyzx
        or r3.w, r11.y, r11.x
        or r3.w, r11.z, r3.w
        mul r12.xyz, r0.yyyy, cb0[38].xyzx
        mad r12.xyz, cb0[37].xyzx, r0.xxxx, r12.xyzx
        mad r12.xyz, cb0[39].xyzx, r0.zzzz, r12.xyzx
        mul r13.xyz, r3.yyyy, cb0[38].xyzx
        mad r13.xyz, cb0[37].xyzx, r3.xxxx, r13.xyzx
        mad r13.xyz, cb0[39].xyzx, r3.zzzz, r13.xyzx
        add r13.xyz, r13.xyzx, cb0[40].xyzx
        add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r14.xyz, r14.xyzx, r12.xyzx
        add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r12.xyz, r13.xyzx, r12.xyzx
        max r12.xyz, r12.xyzx, r14.xyzx
        min r4.w, r12.z, r12.y
        min r4.w, r4.w, r12.x
        and r4.w, r4.w, r11.x
        mul r12.xyz, r0.yyyy, cb0[42].xyzx
        mad r12.xyz, cb0[41].xyzx, r0.xxxx, r12.xyzx
        mad r12.xyz, cb0[43].xyzx, r0.zzzz, r12.xyzx
        mul r13.xyz, r3.yyyy, cb0[42].xyzx
        mad r13.xyz, cb0[41].xyzx, r3.xxxx, r13.xyzx
        mad r13.xyz, cb0[43].xyzx, r3.zzzz, r13.xyzx
        add r13.xyz, r13.xyzx, cb0[44].xyzx
        add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r14.xyz, r14.xyzx, r12.xyzx
        add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r12.xyz, r13.xyzx, r12.xyzx
        max r12.xyz, r12.xyzx, r14.xyzx
        min r5.w, r12.z, r12.y
        min r5.w, r5.w, r12.x
        and r5.w, r5.w, r11.y
        mul r11.xyw, r0.yyyy, cb0[46].xyxz
        mad r11.xyw, cb0[45].xyxz, r0.xxxx, r11.xyxw
        mad r11.xyw, cb0[47].xyxz, r0.zzzz, r11.xyxw
        mul r12.xyz, r3.yyyy, cb0[46].xyzx
        mad r12.xyz, cb0[45].xyzx, r3.xxxx, r12.xyzx
        mad r12.xyz, cb0[47].xyzx, r3.zzzz, r12.xyzx
        add r12.xyz, r12.xyzx, cb0[48].xyzx
        add r13.xyz, -r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r13.xyz, r13.xyzx, r11.xywx
        add r12.xyz, -r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r11.xyw, r12.xyxz, r11.xyxw
        max r11.xyw, r11.xyxw, r13.xyxz
        min r6.w, r11.w, r11.y
        min r6.w, r6.w, r11.x
        and r6.w, r6.w, r11.z
        max r4.w, r4.w, r5.w
        max r4.w, r6.w, r4.w
        mad r11.xyz, r0.xyzx, r4.wwww, r3.xyzx
        add r11.xyz, r11.xyzx, -cb0[20].xyzx
        movc r11.xyz, r3.wwww, r11.xyzx, r0.xyzx
        dp3 r3.w, r11.xyzx, r11.xyzx
        rsq r3.w, r3.w
        mul r11.xyz, r3.wwww, r11.xyzx
        sample_l_indexable(texturecube)(float,float,float,float) r11.xyz, r11.xyzx, t0.xyzw, s2, r1.w
        add r11.xyz, -r2.xyzx, r11.xyzx
        mad r2.xyz, cb0[49].wwww, r11.xyzx, r2.xyzx
      endif 
      mul r2.xyz, r2.xyzx, cb0[20].wwww
    else 
      mov r2.xyz, l(0,0,0,0)
    endif 
    ne r3.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[21].w
    if_nz r3.w
      dp3 r3.w, r0.xyzx, r0.xyzx
      rsq r3.w, r3.w
      mul r11.xyz, r0.xyzx, r3.wwww
      sample_l_indexable(texturecube)(float,float,float,float) r11.xyz, r11.xyzx, t0.xyzw, s2, r1.w
      ne r3.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].w
      if_nz r3.w
        ne r12.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].xyzx
        or r3.w, r12.y, r12.x
        or r3.w, r12.z, r3.w
        mul r13.xyz, r0.yyyy, cb0[38].xyzx
        mad r13.xyz, cb0[37].xyzx, r0.xxxx, r13.xyzx
        mad r13.xyz, cb0[39].xyzx, r0.zzzz, r13.xyzx
        mul r14.xyz, r3.yyyy, cb0[38].xyzx
        mad r14.xyz, cb0[37].xyzx, r3.xxxx, r14.xyzx
        mad r14.xyz, cb0[39].xyzx, r3.zzzz, r14.xyzx
        add r14.xyz, r14.xyzx, cb0[40].xyzx
        add r15.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r15.xyz, r15.xyzx, r13.xyzx
        add r14.xyz, -r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r13.xyz, r14.xyzx, r13.xyzx
        max r13.xyz, r13.xyzx, r15.xyzx
        min r4.w, r13.z, r13.y
        min r4.w, r4.w, r13.x
        and r4.w, r4.w, r12.x
        mul r13.xyz, r0.yyyy, cb0[42].xyzx
        mad r13.xyz, cb0[41].xyzx, r0.xxxx, r13.xyzx
        mad r13.xyz, cb0[43].xyzx, r0.zzzz, r13.xyzx
        mul r14.xyz, r3.yyyy, cb0[42].xyzx
        mad r14.xyz, cb0[41].xyzx, r3.xxxx, r14.xyzx
        mad r14.xyz, cb0[43].xyzx, r3.zzzz, r14.xyzx
        add r14.xyz, r14.xyzx, cb0[44].xyzx
        add r15.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r15.xyz, r15.xyzx, r13.xyzx
        add r14.xyz, -r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r13.xyz, r14.xyzx, r13.xyzx
        max r13.xyz, r13.xyzx, r15.xyzx
        min r5.w, r13.z, r13.y
        min r5.w, r5.w, r13.x
        and r5.w, r5.w, r12.y
        mul r12.xyw, r0.yyyy, cb0[46].xyxz
        mad r12.xyw, cb0[45].xyxz, r0.xxxx, r12.xyxw
        mad r12.xyw, cb0[47].xyxz, r0.zzzz, r12.xyxw
        mul r13.xyz, r3.yyyy, cb0[46].xyzx
        mad r13.xyz, cb0[45].xyzx, r3.xxxx, r13.xyzx
        mad r13.xyz, cb0[47].xyzx, r3.zzzz, r13.xyzx
        add r13.xyz, r13.xyzx, cb0[48].xyzx
        add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r14.xyz, r14.xyzx, r12.xywx
        add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r12.xyw, r13.xyxz, r12.xyxw
        max r12.xyw, r12.xyxw, r14.xyxz
        min r6.w, r12.w, r12.y
        min r6.w, r6.w, r12.x
        and r6.w, r6.w, r12.z
        max r4.w, r4.w, r5.w
        max r4.w, r6.w, r4.w
        mad r12.xyz, r0.xyzx, r4.wwww, r3.xyzx
        add r12.xyz, r12.xyzx, -cb0[21].xyzx
        movc r12.xyz, r3.wwww, r12.xyzx, r0.xyzx
        dp3 r3.w, r12.xyzx, r12.xyzx
        rsq r3.w, r3.w
        mul r12.xyz, r3.wwww, r12.xyzx
        sample_l_indexable(texturecube)(float,float,float,float) r12.xyz, r12.xyzx, t0.xyzw, s2, r1.w
        add r12.xyz, -r11.xyzx, r12.xyzx
        mad r11.xyz, cb0[49].wwww, r12.xyzx, r11.xyzx
      endif 
      mad r2.xyz, r11.xyzx, cb0[21].wwww, r2.xyzx
    endif 
    ne r3.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[22].w
    if_nz r3.w
      dp3 r3.w, r0.xyzx, r0.xyzx
      rsq r3.w, r3.w
      mul r11.xyz, r0.xyzx, r3.wwww
      sample_l_indexable(texturecube)(float,float,float,float) r11.xyz, r11.xyzx, t0.xyzw, s2, r1.w
      ne r3.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].w
      if_nz r3.w
        ne r12.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].xyzx
        or r3.w, r12.y, r12.x
        or r3.w, r12.z, r3.w
        mul r13.xyz, r0.yyyy, cb0[38].xyzx
        mad r13.xyz, cb0[37].xyzx, r0.xxxx, r13.xyzx
        mad r13.xyz, cb0[39].xyzx, r0.zzzz, r13.xyzx
        mul r14.xyz, r3.yyyy, cb0[38].xyzx
        mad r14.xyz, cb0[37].xyzx, r3.xxxx, r14.xyzx
        mad r14.xyz, cb0[39].xyzx, r3.zzzz, r14.xyzx
        add r14.xyz, r14.xyzx, cb0[40].xyzx
        add r15.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r15.xyz, r15.xyzx, r13.xyzx
        add r14.xyz, -r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r13.xyz, r14.xyzx, r13.xyzx
        max r13.xyz, r13.xyzx, r15.xyzx
        min r4.w, r13.z, r13.y
        min r4.w, r4.w, r13.x
        and r4.w, r4.w, r12.x
        mul r13.xyz, r0.yyyy, cb0[42].xyzx
        mad r13.xyz, cb0[41].xyzx, r0.xxxx, r13.xyzx
        mad r13.xyz, cb0[43].xyzx, r0.zzzz, r13.xyzx
        mul r14.xyz, r3.yyyy, cb0[42].xyzx
        mad r14.xyz, cb0[41].xyzx, r3.xxxx, r14.xyzx
        mad r14.xyz, cb0[43].xyzx, r3.zzzz, r14.xyzx
        add r14.xyz, r14.xyzx, cb0[44].xyzx
        add r15.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r15.xyz, r15.xyzx, r13.xyzx
        add r14.xyz, -r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r13.xyz, r14.xyzx, r13.xyzx
        max r13.xyz, r13.xyzx, r15.xyzx
        min r5.w, r13.z, r13.y
        min r5.w, r5.w, r13.x
        and r5.w, r5.w, r12.y
        mul r12.xyw, r0.yyyy, cb0[46].xyxz
        mad r12.xyw, cb0[45].xyxz, r0.xxxx, r12.xyxw
        mad r12.xyw, cb0[47].xyxz, r0.zzzz, r12.xyxw
        mul r13.xyz, r3.yyyy, cb0[46].xyzx
        mad r13.xyz, cb0[45].xyzx, r3.xxxx, r13.xyzx
        mad r13.xyz, cb0[47].xyzx, r3.zzzz, r13.xyzx
        add r13.xyz, r13.xyzx, cb0[48].xyzx
        add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r14.xyz, r14.xyzx, r12.xywx
        add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r12.xyw, r13.xyxz, r12.xyxw
        max r12.xyw, r12.xyxw, r14.xyxz
        min r6.w, r12.w, r12.y
        min r6.w, r6.w, r12.x
        and r6.w, r6.w, r12.z
        max r4.w, r4.w, r5.w
        max r4.w, r6.w, r4.w
        mad r12.xyz, r0.xyzx, r4.wwww, r3.xyzx
        add r12.xyz, r12.xyzx, -cb0[22].xyzx
        movc r12.xyz, r3.wwww, r12.xyzx, r0.xyzx
        dp3 r3.w, r12.xyzx, r12.xyzx
        rsq r3.w, r3.w
        mul r12.xyz, r3.wwww, r12.xyzx
        sample_l_indexable(texturecube)(float,float,float,float) r12.xyz, r12.xyzx, t0.xyzw, s2, r1.w
        add r12.xyz, -r11.xyzx, r12.xyzx
        mad r11.xyz, cb0[49].wwww, r12.xyzx, r11.xyzx
      endif 
      mad r2.xyz, r11.xyzx, cb0[22].wwww, r2.xyzx
    endif 
    ne r3.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[23].w
    if_nz r3.w
      dp3 r3.w, r0.xyzx, r0.xyzx
      rsq r3.w, r3.w
      mul r11.xyz, r0.xyzx, r3.wwww
      sample_l_indexable(texturecube)(float,float,float,float) r11.xyz, r11.xyzx, t0.xyzw, s2, r1.w
      ne r3.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].w
      if_nz r3.w
        ne r12.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[49].xyzx
        or r3.w, r12.y, r12.x
        or r3.w, r12.z, r3.w
        mul r13.xyz, r0.yyyy, cb0[38].xyzx
        mad r13.xyz, cb0[37].xyzx, r0.xxxx, r13.xyzx
        mad r13.xyz, cb0[39].xyzx, r0.zzzz, r13.xyzx
        mul r14.xyz, r3.yyyy, cb0[38].xyzx
        mad r14.xyz, cb0[37].xyzx, r3.xxxx, r14.xyzx
        mad r14.xyz, cb0[39].xyzx, r3.zzzz, r14.xyzx
        add r14.xyz, r14.xyzx, cb0[40].xyzx
        add r15.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r15.xyz, r15.xyzx, r13.xyzx
        add r14.xyz, -r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r13.xyz, r14.xyzx, r13.xyzx
        max r13.xyz, r13.xyzx, r15.xyzx
        min r4.w, r13.z, r13.y
        min r4.w, r4.w, r13.x
        and r4.w, r4.w, r12.x
        mul r13.xyz, r0.yyyy, cb0[42].xyzx
        mad r13.xyz, cb0[41].xyzx, r0.xxxx, r13.xyzx
        mad r13.xyz, cb0[43].xyzx, r0.zzzz, r13.xyzx
        mul r14.xyz, r3.yyyy, cb0[42].xyzx
        mad r14.xyz, cb0[41].xyzx, r3.xxxx, r14.xyzx
        mad r14.xyz, cb0[43].xyzx, r3.zzzz, r14.xyzx
        add r14.xyz, r14.xyzx, cb0[44].xyzx
        add r15.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r15.xyz, r15.xyzx, r13.xyzx
        add r14.xyz, -r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r13.xyz, r14.xyzx, r13.xyzx
        max r13.xyz, r13.xyzx, r15.xyzx
        min r5.w, r13.z, r13.y
        min r5.w, r5.w, r13.x
        and r5.w, r5.w, r12.y
        mul r12.xyw, r0.yyyy, cb0[46].xyxz
        mad r12.xyw, cb0[45].xyxz, r0.xxxx, r12.xyxw
        mad r12.xyw, cb0[47].xyxz, r0.zzzz, r12.xyxw
        mul r13.xyz, r3.yyyy, cb0[46].xyzx
        mad r13.xyz, cb0[45].xyzx, r3.xxxx, r13.xyzx
        mad r13.xyz, cb0[47].xyzx, r3.zzzz, r13.xyzx
        add r13.xyz, r13.xyzx, cb0[48].xyzx
        add r14.xyz, -r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r14.xyz, r14.xyzx, r12.xywx
        add r13.xyz, -r13.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        div r12.xyw, r13.xyxz, r12.xyxw
        max r12.xyw, r12.xyxw, r14.xyxz
        min r6.w, r12.w, r12.y
        min r6.w, r6.w, r12.x
        and r6.w, r6.w, r12.z
        max r4.w, r4.w, r5.w
        max r4.w, r6.w, r4.w
        mad r3.xyz, r0.xyzx, r4.wwww, r3.xyzx
        add r3.xyz, r3.xyzx, -cb0[23].xyzx
        movc r3.xyz, r3.wwww, r3.xyzx, r0.xyzx
        dp3 r3.w, r3.xyzx, r3.xyzx
        rsq r3.w, r3.w
        mul r3.xyz, r3.wwww, r3.xyzx
        sample_l_indexable(texturecube)(float,float,float,float) r3.xyz, r3.xyzx, t0.xyzw, s2, r1.w
        add r3.xyz, -r11.xyzx, r3.xyzx
        mad r11.xyz, cb0[49].wwww, r3.xyzx, r11.xyzx
      endif 
      mad r2.xyz, r11.xyzx, cb0[23].wwww, r2.xyzx
    endif 
    add r2.xyz, -r9.xyzx, r2.xyzx
    mad r9.xyz, cb0[49].wwww, r2.xyzx, r9.xyzx
  endif 
endif 
ne r2.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[50].x
if_nz r2.x
  sample_l_indexable(texturecube)(float,float,float,float) r2.xyz, r0.xyzx, t1.xyzw, s3, r1.w
  add r2.xyz, -r9.xyzx, r2.xyzx
  mad r9.xyz, cb0[50].xxxx, r2.xyzx, r9.xyzx
endif 
sample_l_indexable(texturecube)(float,float,float,float) r2.xyz, r0.xyzx, t0.xyzw, s2, l(7.000000)
add r2.x, r2.y, r2.x
add r2.x, r2.z, r2.x
mul r2.y, r2.x, l(0.333333343)
lt r2.x, l(0.003000), r2.x
div r0.w, r0.w, r2.y
min r0.w, r0.w, l(1.000000)
mul r3.xyz, r0.wwww, r9.xyzx
movc r2.xyz, r2.xxxx, r3.xyzx, r9.xyzx
dp3_sat r0.w, r5.xyzx, r4.xyzx
mad r3.xyzw, r2.wwww, l(-1.000000, -0.027500, -0.572000, 0.022000), l(1.000000, 0.042500, 1.040000, -0.040000)
mul r2.w, r3.x, r3.x
mul r0.w, r0.w, l(-9.280000)
exp r0.w, r0.w
min r0.w, r0.w, r2.w
mad r0.w, r0.w, r3.x, r3.y
mad r3.xy, r0.wwww, l(-1.040000, 1.040000, 0.000000, 0.000000), r3.zwzz
mul_sat r0.w, r6.y, l(50.000000)
mul r0.w, r0.w, r3.y
mad r3.xyz, r6.xyzx, r3.xxxx, r0.wwww
mad r2.xyz, r2.xyzx, r3.xyzx, r10.xyzx
mad r2.xyz, r7.xyzx, cb0[115].xyzx, r2.xyzx
lt r0.w, l(0.000000), cb0[50].y
if_nz r0.w
  sample_l_indexable(texturecube)(float,float,float,float) r0.xyz, r0.xyzx, t0.xyzw, s2, r1.w
  mul r0.xyz, r3.xyzx, r0.xyzx
  mad r2.xyz, r0.xyzx, cb0[50].yyyy, r2.xyzx
endif 
lt r0.x, cb0[50].y, l(0.000000)
div r0.yzw, r2.xxyz, -cb0[50].yyyy
movc o0.xyz, r0.xxxx, r0.yzwy, r2.xyzx
dp3 r0.x, r1.xyzx, r1.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, r1.xyzx
mad o1.xyz, r0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
mul_sat o4.w, cb0[109].z, l(0.015625)
mov o0.w, l(0)
mov o1.w, cb0[109].x
mov o2.xyzw, l(0,0,0,0)
mov o3.xyz, r8.xyzx
mov o3.w, l(0.588223696)
mov o4.xyz, r7.xyzx
mov o5.xyzw, l(0,0,0,0)
mov o6.xyzw, l(0,0,0,0)
ret 
// Approximately 938 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
