//temple cutscece halo-- no fix
// ---- Created with 3Dmigoto v1.2.39 on Sun Jun 26 13:47:03 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);
  float3 FogVolumeDensityParameters : packoffset(c65);
  float4 FogVolumeHalfspaceParameters : packoffset(c66);
  float3 ApproxFogColor : packoffset(c67);
  float3 FogVolumeBoxMin : packoffset(c68);
  float3 FogVolumeBoxMax : packoffset(c69);
  float3x3 LocalToWorldMatrix : packoffset(c70);
  float3x3 WorldToLocalMatrix : packoffset(c73);
  float3x3 WorldToViewMatrix : packoffset(c76);
  float3x3 ViewToWorldMatrix : packoffset(c79);
  float4 UniformPixelVector_0 : packoffset(c82);
  float4 UniformPixelVector_1 : packoffset(c83);
  float4 UniformPixelVector_2 : packoffset(c84);
  float4 UniformPixelVector_3 : packoffset(c85);
  float4 UniformPixelVector_4 : packoffset(c86);
  float4 UniformPixelVector_5 : packoffset(c87);
  float4 UniformPixelVector_6 : packoffset(c88);
  float4 UniformPixelVector_7 : packoffset(c89);
  float4 UniformPixelVector_8 : packoffset(c90);
  float4 UniformPixelVector_9 : packoffset(c91);
  float4 UniformPixelVector_10 : packoffset(c92);
  float4 UniformPixelScalars_0 : packoffset(c93);
  float4 UniformPixelScalars_1 : packoffset(c94);
  float4 UniformPixelScalars_2 : packoffset(c95);
  float4 UniformPixelScalars_3 : packoffset(c96);
  float4 UniformPixelScalars_4 : packoffset(c97);
  float4 UniformPixelScalars_5 : packoffset(c98);
  float4 UniformPixelScalars_6 : packoffset(c99);
  float4 UniformPixelScalars_7 : packoffset(c100);
  float3 TemporalAAParameters : packoffset(c101);
  float4x4 PreviousLocalToWorld : packoffset(c102);
  float LocalToWorldRotDeterminantFlip : packoffset(c106);
  float3x3 WorldToLocal : packoffset(c107);
  float4 LightmapCoordinateScaleBias : packoffset(c110);
  float4 ShadowmapCoordinateScaleBias : packoffset(c111);
  float SubSurfaceQuality : packoffset(c112);
  float4 DeferredRenderingParameters : packoffset(c113);
  float2 TemporalAAParametersPS : packoffset(c114);
  float3 SpotDirection : packoffset(c115);
  float2 SpotAngles : packoffset(c116);
  float3 UpperSkyColor : packoffset(c117);
  float3 LowerSkyColor : packoffset(c118);
  float UseOnlyLightMapSpecular : packoffset(c118.w);
  float4 AmbientColorAndSkyFactor : packoffset(c119);
  float EmissiveMultiplier : packoffset(c120);
  float DiffuseMultiplier : packoffset(c120.y);
}

cbuffer VSOffsetConstants : register(b1)
{
  float4x4 ViewProjectionMatrix : packoffset(c0);
  float4 CameraPositionVS : packoffset(c4);
  float4 PreViewTranslation : packoffset(c5);
}

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 SceneColorTextureSampler_s : register(s0);
SamplerState AmbientReflectionCubemapSampler_s : register(s1);
SamplerState ForcedIBLCubemapSampler_s : register(s2);
SamplerState PixelTexture2D_0Sampler_s : register(s3);
SamplerState PixelTexture2D_1Sampler_s : register(s4);
SamplerState PixelTexture2D_2Sampler_s : register(s5);
SamplerState PixelTexture2D_3Sampler_s : register(s6);
Texture2D<float4> SceneColorTexture : register(t0);
TextureCube<float4> AmbientReflectionCubemap : register(t1);
TextureCube<float4> ForcedIBLCubemap : register(t2);
Texture2D<float4> PixelTexture2D_0 : register(t3);
Texture2D<float4> PixelTexture2D_1 : register(t4);
Texture2D<float4> PixelTexture2D_2 : register(t5);
Texture2D<float4> PixelTexture2D_3 : register(t6);


// 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 : TEXCOORD4,
  float4 v5 : TEXCOORD6,
  float4 v6 : TEXCOORD7,
  float4 v7 : TEXCOORD5,
  float4 v8 : SV_POSITION0,
  //uint v8 : SV_IsFrontFace0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r20;
  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;
  r4.xyz = ViewProjectionMatrix._m01_m11_m31 * v7.yyy;
  r4.xyz = ViewProjectionMatrix._m00_m10_m30 * v7.xxx + r4.xyz;
  r4.xyz = ViewProjectionMatrix._m02_m12_m32 * v7.zzz + r4.xyz;
  r4.xyz = ViewProjectionMatrix._m03_m13_m33 * v7.www + r4.xyz;

float4 stereo = StereoParams.Load(0);
r4.x += stereo.x*(r4.z - stereo.y);

  r0.w = dot(-v7.xyz, -v7.xyz);
  r0.w = rsqrt(r0.w);
  r5.xyz = -v7.xyz * r0.www;
  r6.xyz = r5.yyy * r2.xyz;
  r5.xyw = r5.xxx * r1.xyz + r6.xyz;
  r5.xyz = r5.zzz * r0.xyz + r5.xyw;
  r6.xyz = PixelTexture2D_0.SampleBias(PixelTexture2D_0Sampler_s, v3.xy, 0).xyz;
  r6.xyz = r6.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r6.xyz = UniformPixelVector_2.xyz * r6.xyz;
  r7.xyz = PixelTexture2D_1.SampleBias(PixelTexture2D_1Sampler_s, v3.xy, 0).xyz;
  r7.xyz = r7.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r0.w = abs(r1.z);
  r1.w = abs(r0.z);
  r2.w = cmp(r0.w >= r1.w);
  r3.w = cmp(r1.w < r0.w);
  r3.w = r3.w ? r0.w : 0;
  r2.w = r2.w ? r3.w : 0;
  r3.w = abs(r2.z);
  r4.w = cmp(r2.w >= r3.w);
  r2.w = cmp(r3.w < r2.w);
  r8.xy = r2.ww ? r3.yz : 0;
  r8.xy = r4.ww ? r8.xy : 0;
  r2.w = cmp(r3.w >= r1.w);
  r4.w = cmp(r1.w < r3.w);
  r4.w = r4.w ? r3.w : 0;
  r2.w = r2.w ? r4.w : 0;
  r4.w = cmp(r2.w >= r0.w);
  r2.w = cmp(r0.w < r2.w);
  r8.zw = r2.ww ? r3.xz : 0;
  r8.zw = r4.ww ? r8.zw : 0;
  r8.xy = r8.xy + r8.zw;
  r2.w = cmp(r1.w >= r0.w);
  r0.w = cmp(r0.w < r1.w);
  r0.w = r0.w ? r1.w : 0;
  r0.w = r0.w ? r2.w : 0;
  r1.w = cmp(r0.w >= r3.w);
  r0.w = cmp(r3.w < r0.w);
  r8.zw = r0.ww ? r3.xy : 0;
  r8.zw = r1.ww ? r8.zw : 0;
  r8.xy = r8.xy + r8.zw;
  r8.zw = UniformPixelScalars_2.xx * r8.xy;
  r9.xy = r8.zw * float2(0.899999976,0.899999976) + UniformPixelVector_5.xy;
  r0.w = PixelTexture2D_2.SampleBias(PixelTexture2D_2Sampler_s, r9.xy, 0).x;
  r8.xy = UniformPixelScalars_2.xx * r8.xy + UniformPixelVector_6.xy;
  r1.w = PixelTexture2D_2.SampleBias(PixelTexture2D_2Sampler_s, r8.xy, 0).x;
  r0.w = r1.w * r0.w;
  r8.xy = r8.zw * float2(0.809999943,0.809999943) + UniformPixelVector_7.xy;
  r1.w = PixelTexture2D_2.SampleBias(PixelTexture2D_2Sampler_s, r8.xy, 0).x;
  r0.w = saturate(r0.w * r1.w + UniformPixelScalars_3.w);
  r0.w = saturate(UniformPixelScalars_4.x * r0.w);
  r1.w = cmp(r0.w < 9.99999997e-007);
  r0.w = log2(r0.w);
  r0.w = UniformPixelScalars_4.y * r0.w;
  r0.w = exp2(r0.w);
  r0.w = r1.w ? 0 : r0.w;
  r7.xyz = r7.xyz * UniformPixelVector_4.xyz + -r6.xyz;
  r6.xyz = r0.www * r7.xyz + r6.xyz;
  r6.xyz = float3(0,0,9.99999975e-005) + r6.xyz;
  r1.w = dot(r6.xyz, r6.xyz);
  r1.w = sqrt(r1.w);
  r6.xyz = r6.xyz / r1.www;
  r1.w = dot(r6.xyz, r6.xyz);
  r1.w = rsqrt(r1.w);
  r6.xyz = r6.xyz * r1.www;
  r7.xyz = float3(1,1,1) + -UniformPixelVector_0.xyz;
  r8.xyzw = PixelTexture2D_3.SampleBias(PixelTexture2D_3Sampler_s, v3.xy, 0).xyzw;
  r9.xyz = UniformPixelVector_8.xyz * r8.xyz;
  r8.xyz = -r8.xyz * UniformPixelVector_8.xyz + UniformPixelVector_9.xyz;
  r8.xyz = r0.www * r8.xyz + r9.xyz;
  r7.xyz = r8.xyz * r7.xyz;
  r7.xyz = r7.xyz * DiffuseOverrideParameter.www + DiffuseOverrideParameter.xyz;
  r9.xyz = DiffuseMultiplier * r7.xyz;
  r1.w = saturate(r8.w * UniformPixelVector_8.w + UniformPixelScalars_4.z);
  r2.w = UniformPixelVector_9.w + -r1.w;
  r1.w = r0.w * r2.w + r1.w;
  r4.xy = r4.xy / r4.zz;
  r4.xy = r4.xy * ScreenPositionScaleBias.xy + ScreenPositionScaleBias.wz;

float4 res = IniParams.Load(int2(1, 0));
//r20.xy = ((1 / res.xy) * v8.xy) + (0.5 / res.xy);

  r4.xyz = SceneColorTexture.Sample(SceneColorTextureSampler_s, r20.xy).xyz;
  r4.xyz = r8.xyz * r4.xyz;
  r4.xyz = r1.www * r4.xyz + UniformPixelVector_0.xyz;
  r1.w = -UniformPixelScalars_5.x + UniformPixelScalars_4.w;
  r1.w = r0.w * r1.w + UniformPixelScalars_5.x;
  r8.xyz = r1.www * SpecularOverrideParameter.www + SpecularOverrideParameter.xyz;
  r1.w = UniformPixelScalars_6.y + -UniformPixelScalars_6.z;
  r1.w = UniformPixelScalars_6.x * r1.w + UniformPixelScalars_6.z;
  r2.w = -UniformPixelScalars_7.x + UniformPixelScalars_6.y;
  r2.w = UniformPixelScalars_6.w * r2.w + UniformPixelScalars_7.x;
  r2.w = r2.w + -r1.w;
  r1.w = r0.w * r2.w + r1.w;
  r2.w = UniformPixelScalars_7.y + -UniformPixelScalars_7.z;
  r0.w = r0.w * r2.w + UniformPixelScalars_7.z;
  r8.yzw = float3(0.0799999982,0.0799999982,0.0799999982) * r8.xyz;
  r7.xyz = r7.xyz * DiffuseMultiplier + -r8.yzw;
  r7.xyz = r0.www * r7.xyz + r8.yzw;
  r2.w = saturate(r8.x + r8.x);
  r2.w = -1 + r2.w;
  r2.w = r0.w * r2.w + 1;
  r7.xyz = r7.xyz * r2.www;
  r8.xyz = -r9.xyz * r0.www + r9.xyz;
  r0.w = dot(v7.xyz, v7.xyz);
  r0.w = rsqrt(r0.w);
  r9.xyz = v7.xyz * r0.www;
  r1.x = dot(r1.xyz, r6.xyz);
  r1.y = dot(r2.xyz, r6.xyz);
  r1.z = dot(r0.xyz, r6.xyz);
  r0.x = dot(r9.xyz, r1.xyz);
  r0.x = r0.x + r0.x;
  r0.xyz = r1.xyz * -r0.xxx + r9.xyz;
  r0.w = log2(r1.w);
  r0.w = -r0.w * 1.20000005 + 1;
  r0.w = 6 + -r0.w;
  r1.xyz = cmp(float3(0,0,0) != IBLUseProxyVolume.xyz);
  r2.x = (int)r1.y | (int)r1.x;
  r2.x = (int)r1.z | (int)r2.x;
  if (r2.x != 0) {
    r2.y = cmp(0 != IBLPositionAndWeight0.w);
    if (r2.y != 0) {
      r2.yzw = IBLProxyOBB0._m01_m11_m21 * r0.yyy;
      r2.yzw = IBLProxyOBB0._m00_m10_m20 * r0.xxx + r2.yzw;
      r2.yzw = IBLProxyOBB0._m02_m12_m22 * r0.zzz + r2.yzw;
      r9.xyz = IBLProxyOBB0._m01_m11_m21 * r3.yyy;
      r9.xyz = IBLProxyOBB0._m00_m10_m20 * r3.xxx + r9.xyz;
      r9.xyz = IBLProxyOBB0._m02_m12_m22 * r3.zzz + r9.xyz;
      r9.xyz = IBLProxyOBB0._m03_m13_m23 + r9.xyz;
      r10.xyz = float3(1,1,1) + -r9.xyz;
      r10.xyz = r10.xyz / r2.yzw;
      r9.xyz = float3(-1,-1,-1) + -r9.xyz;
      r2.yzw = r9.xyz / r2.yzw;
      r2.yzw = max(r10.xyz, r2.yzw);
      r2.z = min(r2.z, r2.w);
      r2.y = min(r2.y, r2.z);
      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;
      r10.xyz = IBLProxyOBB1._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB1._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB1._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB1._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r2.z = min(r9.y, r9.z);
      r2.z = min(r9.x, r2.z);
      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;
      r10.xyz = IBLProxyOBB2._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB2._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB2._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB2._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r2.w = min(r9.y, r9.z);
      r2.w = min(r9.x, r2.w);
      r2.yzw = r1.xyz ? r2.yzw : 0;
      r2.y = max(r2.y, r2.z);
      r2.y = max(r2.y, r2.w);
      r2.yzw = r0.xyz * r2.yyy + r3.xyz;
      r2.yzw = -IBLPositionAndWeight0.xyz + r2.yzw;
      r2.yzw = r2.xxx ? r2.yzw : r0.xyz;
      r3.w = dot(r2.yzw, r2.yzw);
      r3.w = rsqrt(r3.w);
      r2.yzw = r3.www * r2.yzw;
      r2.yzw = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r2.yzw, r0.w).xyz;
      r3.w = cmp(0 != IBLUseLastProxyVolume.w);
      if (r3.w != 0) {
        r9.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
        r3.w = (int)r9.y | (int)r9.x;
        r3.w = (int)r9.z | (int)r3.w;
        r10.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
        r10.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r10.xyz;
        r10.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r10.xyz;
        r11.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
        r11.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r11.xyz;
        r11.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r11.xyz;
        r11.xyz = IBLLastProxyOBB0._m03_m13_m23 + r11.xyz;
        r12.xyz = float3(1,1,1) + -r11.xyz;
        r12.xyz = r12.xyz / r10.xyz;
        r11.xyz = float3(-1,-1,-1) + -r11.xyz;
        r10.xyz = r11.xyz / r10.xyz;
        r10.xyz = max(r12.xyz, r10.xyz);
        r4.w = min(r10.y, r10.z);
        r4.w = min(r10.x, r4.w);
        r4.w = r9.x ? r4.w : 0;
        r10.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
        r10.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r10.xyz;
        r10.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r10.xyz;
        r11.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
        r11.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r11.xyz;
        r11.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r11.xyz;
        r11.xyz = IBLLastProxyOBB1._m03_m13_m23 + r11.xyz;
        r12.xyz = float3(1,1,1) + -r11.xyz;
        r12.xyz = r12.xyz / r10.xyz;
        r11.xyz = float3(-1,-1,-1) + -r11.xyz;
        r10.xyz = r11.xyz / r10.xyz;
        r10.xyz = max(r12.xyz, r10.xyz);
        r5.w = min(r10.y, r10.z);
        r5.w = min(r10.x, r5.w);
        r5.w = r9.y ? r5.w : 0;
        r9.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
        r9.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r9.xyw;
        r9.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r9.xyw;
        r10.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
        r10.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r10.xyz;
        r10.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r10.xyz;
        r10.xyz = IBLLastProxyOBB2._m03_m13_m23 + r10.xyz;
        r11.xyz = float3(1,1,1) + -r10.xyz;
        r11.xyz = r11.xyz / r9.xyw;
        r10.xyz = float3(-1,-1,-1) + -r10.xyz;
        r9.xyw = r10.xyz / r9.xyw;
        r9.xyw = max(r11.xyz, r9.xyw);
        r6.w = min(r9.y, r9.w);
        r6.w = min(r9.x, r6.w);
        r6.w = r9.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;
        r3.w = dot(r9.xyz, r9.xyz);
        r3.w = rsqrt(r3.w);
        r9.xyz = r9.xyz * r3.www;
        r9.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r9.xyz, r0.w).xyz;
        r9.xyz = r9.xyz + -r2.yzw;
        r2.yzw = IBLUseLastProxyVolume.www * r9.xyz + r2.yzw;
      }
      r2.yzw = IBLPositionAndWeight0.www * r2.yzw;
    } else {
      r2.yzw = float3(0,0,0);
    }
    r3.w = cmp(0 != IBLPositionAndWeight1.w);
    if (r3.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;
      r10.xyz = IBLProxyOBB0._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB0._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB0._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB0._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r3.w = min(r9.y, r9.z);
      r3.w = min(r9.x, r3.w);
      r3.w = r1.x ? r3.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;
      r10.xyz = IBLProxyOBB1._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB1._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB1._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB1._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r4.w = min(r9.y, r9.z);
      r4.w = min(r9.x, r4.w);
      r4.w = r1.y ? r4.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;
      r10.xyz = IBLProxyOBB2._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB2._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB2._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB2._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r5.w = min(r9.y, r9.z);
      r5.w = min(r9.x, r5.w);
      r5.w = r1.z ? r5.w : 0;
      r3.w = max(r4.w, r3.w);
      r3.w = max(r3.w, r5.w);
      r9.xyz = r0.xyz * r3.www + r3.xyz;
      r9.xyz = -IBLPositionAndWeight1.xyz + r9.xyz;
      r9.xyz = r2.xxx ? r9.xyz : r0.xyz;
      r3.w = dot(r9.xyz, r9.xyz);
      r3.w = rsqrt(r3.w);
      r9.xyz = r9.xyz * r3.www;
      r9.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r9.xyz, r0.w).xyz;
      r3.w = cmp(0 != IBLUseLastProxyVolume.w);
      if (r3.w != 0) {
        r10.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
        r3.w = (int)r10.y | (int)r10.x;
        r3.w = (int)r10.z | (int)r3.w;
        r11.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
        r11.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r11.xyz;
        r11.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r11.xyz;
        r12.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
        r12.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r12.xyz;
        r12.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r12.xyz;
        r12.xyz = IBLLastProxyOBB0._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 = r10.x ? r4.w : 0;
        r11.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
        r11.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r11.xyz;
        r11.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r11.xyz;
        r12.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
        r12.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r12.xyz;
        r12.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r12.xyz;
        r12.xyz = IBLLastProxyOBB1._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 = r10.y ? r5.w : 0;
        r10.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
        r10.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r10.xyw;
        r10.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r10.xyw;
        r11.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
        r11.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r11.xyz;
        r11.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r11.xyz;
        r11.xyz = IBLLastProxyOBB2._m03_m13_m23 + r11.xyz;
        r12.xyz = float3(1,1,1) + -r11.xyz;
        r12.xyz = r12.xyz / r10.xyw;
        r11.xyz = float3(-1,-1,-1) + -r11.xyz;
        r10.xyw = r11.xyz / r10.xyw;
        r10.xyw = max(r12.xyz, r10.xyw);
        r6.w = min(r10.y, r10.w);
        r6.w = min(r10.x, r6.w);
        r6.w = r10.z ? r6.w : 0;
        r4.w = max(r5.w, r4.w);
        r4.w = max(r4.w, r6.w);
        r10.xyz = r0.xyz * r4.www + r3.xyz;
        r10.xyz = -IBLPositionAndWeight1.xyz + r10.xyz;
        r10.xyz = r3.www ? r10.xyz : r0.xyz;
        r3.w = dot(r10.xyz, r10.xyz);
        r3.w = rsqrt(r3.w);
        r10.xyz = r10.xyz * r3.www;
        r10.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r10.xyz, r0.w).xyz;
        r10.xyz = r10.xyz + -r9.xyz;
        r9.xyz = IBLUseLastProxyVolume.www * r10.xyz + r9.xyz;
      }
      r2.yzw = r9.xyz * IBLPositionAndWeight1.www + r2.yzw;
    }
    r3.w = cmp(0 != IBLPositionAndWeight2.w);
    if (r3.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;
      r10.xyz = IBLProxyOBB0._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB0._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB0._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB0._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r3.w = min(r9.y, r9.z);
      r3.w = min(r9.x, r3.w);
      r3.w = r1.x ? r3.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;
      r10.xyz = IBLProxyOBB1._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB1._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB1._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB1._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r4.w = min(r9.y, r9.z);
      r4.w = min(r9.x, r4.w);
      r4.w = r1.y ? r4.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;
      r10.xyz = IBLProxyOBB2._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB2._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB2._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB2._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r5.w = min(r9.y, r9.z);
      r5.w = min(r9.x, r5.w);
      r5.w = r1.z ? r5.w : 0;
      r3.w = max(r4.w, r3.w);
      r3.w = max(r3.w, r5.w);
      r9.xyz = r0.xyz * r3.www + r3.xyz;
      r9.xyz = -IBLPositionAndWeight2.xyz + r9.xyz;
      r9.xyz = r2.xxx ? r9.xyz : r0.xyz;
      r3.w = dot(r9.xyz, r9.xyz);
      r3.w = rsqrt(r3.w);
      r9.xyz = r9.xyz * r3.www;
      r9.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r9.xyz, r0.w).xyz;
      r3.w = cmp(0 != IBLUseLastProxyVolume.w);
      if (r3.w != 0) {
        r10.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
        r3.w = (int)r10.y | (int)r10.x;
        r3.w = (int)r10.z | (int)r3.w;
        r11.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
        r11.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r11.xyz;
        r11.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r11.xyz;
        r12.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
        r12.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r12.xyz;
        r12.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r12.xyz;
        r12.xyz = IBLLastProxyOBB0._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 = r10.x ? r4.w : 0;
        r11.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
        r11.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r11.xyz;
        r11.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r11.xyz;
        r12.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
        r12.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r12.xyz;
        r12.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r12.xyz;
        r12.xyz = IBLLastProxyOBB1._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 = r10.y ? r5.w : 0;
        r10.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
        r10.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r10.xyw;
        r10.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r10.xyw;
        r11.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
        r11.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r11.xyz;
        r11.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r11.xyz;
        r11.xyz = IBLLastProxyOBB2._m03_m13_m23 + r11.xyz;
        r12.xyz = float3(1,1,1) + -r11.xyz;
        r12.xyz = r12.xyz / r10.xyw;
        r11.xyz = float3(-1,-1,-1) + -r11.xyz;
        r10.xyw = r11.xyz / r10.xyw;
        r10.xyw = max(r12.xyz, r10.xyw);
        r6.w = min(r10.y, r10.w);
        r6.w = min(r10.x, r6.w);
        r6.w = r10.z ? r6.w : 0;
        r4.w = max(r5.w, r4.w);
        r4.w = max(r4.w, r6.w);
        r10.xyz = r0.xyz * r4.www + r3.xyz;
        r10.xyz = -IBLPositionAndWeight2.xyz + r10.xyz;
        r10.xyz = r3.www ? r10.xyz : r0.xyz;
        r3.w = dot(r10.xyz, r10.xyz);
        r3.w = rsqrt(r3.w);
        r10.xyz = r10.xyz * r3.www;
        r10.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r10.xyz, r0.w).xyz;
        r10.xyz = r10.xyz + -r9.xyz;
        r9.xyz = IBLUseLastProxyVolume.www * r10.xyz + r9.xyz;
      }
      r2.yzw = r9.xyz * IBLPositionAndWeight2.www + r2.yzw;
    }
    r3.w = cmp(0 != IBLPositionAndWeight3.w);
    if (r3.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;
      r10.xyz = IBLProxyOBB0._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB0._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB0._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB0._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r3.w = min(r9.y, r9.z);
      r3.w = min(r9.x, r3.w);
      r1.x = r1.x ? r3.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;
      r10.xyz = IBLProxyOBB1._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB1._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB1._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB1._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r3.w = min(r9.y, r9.z);
      r3.w = min(r9.x, r3.w);
      r1.y = r1.y ? r3.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;
      r10.xyz = IBLProxyOBB2._m01_m11_m21 * r3.yyy;
      r10.xyz = IBLProxyOBB2._m00_m10_m20 * r3.xxx + r10.xyz;
      r10.xyz = IBLProxyOBB2._m02_m12_m22 * r3.zzz + r10.xyz;
      r10.xyz = IBLProxyOBB2._m03_m13_m23 + r10.xyz;
      r11.xyz = float3(1,1,1) + -r10.xyz;
      r11.xyz = r11.xyz / r9.xyz;
      r10.xyz = float3(-1,-1,-1) + -r10.xyz;
      r9.xyz = r10.xyz / r9.xyz;
      r9.xyz = max(r11.xyz, r9.xyz);
      r3.w = min(r9.y, r9.z);
      r3.w = min(r9.x, r3.w);
      r1.z = r1.z ? r3.w : 0;
      r1.x = max(r1.x, r1.y);
      r1.x = max(r1.x, r1.z);
      r1.xyz = r0.xyz * r1.xxx + r3.xyz;
      r1.xyz = -IBLPositionAndWeight3.xyz + r1.xyz;
      r1.xyz = r2.xxx ? r1.xyz : r0.xyz;
      r2.x = dot(r1.xyz, r1.xyz);
      r2.x = rsqrt(r2.x);
      r1.xyz = r2.xxx * r1.xyz;
      r1.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r1.xyz, r0.w).xyz;
      r2.x = cmp(0 != IBLUseLastProxyVolume.w);
      if (r2.x != 0) {
        r9.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
        r2.x = (int)r9.y | (int)r9.x;
        r2.x = (int)r9.z | (int)r2.x;
        r10.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
        r10.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r10.xyz;
        r10.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r10.xyz;
        r11.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
        r11.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r11.xyz;
        r11.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r11.xyz;
        r11.xyz = IBLLastProxyOBB0._m03_m13_m23 + r11.xyz;
        r12.xyz = float3(1,1,1) + -r11.xyz;
        r12.xyz = r12.xyz / r10.xyz;
        r11.xyz = float3(-1,-1,-1) + -r11.xyz;
        r10.xyz = r11.xyz / r10.xyz;
        r10.xyz = max(r12.xyz, r10.xyz);
        r3.w = min(r10.y, r10.z);
        r3.w = min(r10.x, r3.w);
        r3.w = r9.x ? r3.w : 0;
        r10.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
        r10.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r10.xyz;
        r10.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r10.xyz;
        r11.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
        r11.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r11.xyz;
        r11.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r11.xyz;
        r11.xyz = IBLLastProxyOBB1._m03_m13_m23 + r11.xyz;
        r12.xyz = float3(1,1,1) + -r11.xyz;
        r12.xyz = r12.xyz / r10.xyz;
        r11.xyz = float3(-1,-1,-1) + -r11.xyz;
        r10.xyz = r11.xyz / r10.xyz;
        r10.xyz = max(r12.xyz, r10.xyz);
        r4.w = min(r10.y, r10.z);
        r4.w = min(r10.x, r4.w);
        r4.w = r9.y ? r4.w : 0;
        r9.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
        r9.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r9.xyw;
        r9.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r9.xyw;
        r10.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
        r10.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r10.xyz;
        r10.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r10.xyz;
        r10.xyz = IBLLastProxyOBB2._m03_m13_m23 + r10.xyz;
        r11.xyz = float3(1,1,1) + -r10.xyz;
        r11.xyz = r11.xyz / r9.xyw;
        r10.xyz = float3(-1,-1,-1) + -r10.xyz;
        r9.xyw = r10.xyz / r9.xyw;
        r9.xyw = max(r11.xyz, r9.xyw);
        r5.w = min(r9.y, r9.w);
        r5.w = min(r9.x, r5.w);
        r5.w = r9.z ? r5.w : 0;
        r3.w = max(r4.w, r3.w);
        r3.w = max(r3.w, r5.w);
        r9.xyz = r0.xyz * r3.www + r3.xyz;
        r9.xyz = -IBLPositionAndWeight3.xyz + r9.xyz;
        r9.xyz = r2.xxx ? r9.xyz : r0.xyz;
        r2.x = dot(r9.xyz, r9.xyz);
        r2.x = rsqrt(r2.x);
        r9.xyz = r9.xyz * r2.xxx;
        r9.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r9.xyz, r0.w).xyz;
        r9.xyz = r9.xyz + -r1.xyz;
        r1.xyz = IBLUseLastProxyVolume.www * r9.xyz + r1.xyz;
      }
      r2.yzw = r1.xyz * IBLPositionAndWeight3.www + r2.yzw;
    }
  } else {
    r2.yzw = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r0.xyz, r0.w).xyz;
    r1.x = cmp(0 != IBLUseLastProxyVolume.w);
    if (r1.x != 0) {
      r1.x = cmp(0 != IBLPositionAndWeight0.w);
      if (r1.x != 0) {
        r1.x = dot(r0.xyz, r0.xyz);
        r1.x = rsqrt(r1.x);
        r1.xyz = r1.xxx * r0.xyz;
        r1.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r1.xyz, r0.w).xyz;
        r2.x = cmp(0 != IBLUseLastProxyVolume.w);
        if (r2.x != 0) {
          r9.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
          r2.x = (int)r9.y | (int)r9.x;
          r2.x = (int)r9.z | (int)r2.x;
          r10.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
          r10.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r10.xyz;
          r10.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r10.xyz;
          r11.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
          r11.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r11.xyz;
          r11.xyz = IBLLastProxyOBB0._m03_m13_m23 + r11.xyz;
          r12.xyz = float3(1,1,1) + -r11.xyz;
          r12.xyz = r12.xyz / r10.xyz;
          r11.xyz = float3(-1,-1,-1) + -r11.xyz;
          r10.xyz = r11.xyz / r10.xyz;
          r10.xyz = max(r12.xyz, r10.xyz);
          r3.w = min(r10.y, r10.z);
          r3.w = min(r10.x, r3.w);
          r3.w = r9.x ? r3.w : 0;
          r10.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
          r10.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r10.xyz;
          r10.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r10.xyz;
          r11.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
          r11.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r11.xyz;
          r11.xyz = IBLLastProxyOBB1._m03_m13_m23 + r11.xyz;
          r12.xyz = float3(1,1,1) + -r11.xyz;
          r12.xyz = r12.xyz / r10.xyz;
          r11.xyz = float3(-1,-1,-1) + -r11.xyz;
          r10.xyz = r11.xyz / r10.xyz;
          r10.xyz = max(r12.xyz, r10.xyz);
          r4.w = min(r10.y, r10.z);
          r4.w = min(r10.x, r4.w);
          r4.w = r9.y ? r4.w : 0;
          r9.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
          r9.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r9.xyw;
          r9.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r9.xyw;
          r10.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
          r10.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r10.xyz;
          r10.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r10.xyz;
          r10.xyz = IBLLastProxyOBB2._m03_m13_m23 + r10.xyz;
          r11.xyz = float3(1,1,1) + -r10.xyz;
          r11.xyz = r11.xyz / r9.xyw;
          r10.xyz = float3(-1,-1,-1) + -r10.xyz;
          r9.xyw = r10.xyz / r9.xyw;
          r9.xyw = max(r11.xyz, r9.xyw);
          r5.w = min(r9.y, r9.w);
          r5.w = min(r9.x, r5.w);
          r5.w = r9.z ? r5.w : 0;
          r3.w = max(r4.w, r3.w);
          r3.w = max(r3.w, r5.w);
          r9.xyz = r0.xyz * r3.www + r3.xyz;
          r9.xyz = -IBLPositionAndWeight0.xyz + r9.xyz;
          r9.xyz = r2.xxx ? r9.xyz : r0.xyz;
          r2.x = dot(r9.xyz, r9.xyz);
          r2.x = rsqrt(r2.x);
          r9.xyz = r9.xyz * r2.xxx;
          r9.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r9.xyz, r0.w).xyz;
          r9.xyz = r9.xyz + -r1.xyz;
          r1.xyz = IBLUseLastProxyVolume.www * r9.xyz + r1.xyz;
        }
        r1.xyz = IBLPositionAndWeight0.www * r1.xyz;
      } else {
        r1.xyz = float3(0,0,0);
      }
      r2.x = cmp(0 != IBLPositionAndWeight1.w);
      if (r2.x != 0) {
        r2.x = dot(r0.xyz, r0.xyz);
        r2.x = rsqrt(r2.x);
        r9.xyz = r2.xxx * r0.xyz;
        r9.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r9.xyz, r0.w).xyz;
        r2.x = cmp(0 != IBLUseLastProxyVolume.w);
        if (r2.x != 0) {
          r10.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
          r2.x = (int)r10.y | (int)r10.x;
          r2.x = (int)r10.z | (int)r2.x;
          r11.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
          r11.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r11.xyz;
          r12.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
          r12.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r12.xyz;
          r12.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r12.xyz;
          r12.xyz = IBLLastProxyOBB0._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);
          r3.w = min(r11.y, r11.z);
          r3.w = min(r11.x, r3.w);
          r3.w = r10.x ? r3.w : 0;
          r11.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
          r11.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r11.xyz;
          r12.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
          r12.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r12.xyz;
          r12.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r12.xyz;
          r12.xyz = IBLLastProxyOBB1._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 = r10.y ? r4.w : 0;
          r10.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
          r10.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r10.xyw;
          r10.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r10.xyw;
          r11.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
          r11.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r11.xyz;
          r11.xyz = IBLLastProxyOBB2._m03_m13_m23 + r11.xyz;
          r12.xyz = float3(1,1,1) + -r11.xyz;
          r12.xyz = r12.xyz / r10.xyw;
          r11.xyz = float3(-1,-1,-1) + -r11.xyz;
          r10.xyw = r11.xyz / r10.xyw;
          r10.xyw = max(r12.xyz, r10.xyw);
          r5.w = min(r10.y, r10.w);
          r5.w = min(r10.x, r5.w);
          r5.w = r10.z ? r5.w : 0;
          r3.w = max(r4.w, r3.w);
          r3.w = max(r3.w, r5.w);
          r10.xyz = r0.xyz * r3.www + r3.xyz;
          r10.xyz = -IBLPositionAndWeight1.xyz + r10.xyz;
          r10.xyz = r2.xxx ? r10.xyz : r0.xyz;
          r2.x = dot(r10.xyz, r10.xyz);
          r2.x = rsqrt(r2.x);
          r10.xyz = r10.xyz * r2.xxx;
          r10.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r10.xyz, r0.w).xyz;
          r10.xyz = r10.xyz + -r9.xyz;
          r9.xyz = IBLUseLastProxyVolume.www * r10.xyz + r9.xyz;
        }
        r1.xyz = r9.xyz * IBLPositionAndWeight1.www + r1.xyz;
      }
      r2.x = cmp(0 != IBLPositionAndWeight2.w);
      if (r2.x != 0) {
        r2.x = dot(r0.xyz, r0.xyz);
        r2.x = rsqrt(r2.x);
        r9.xyz = r2.xxx * r0.xyz;
        r9.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r9.xyz, r0.w).xyz;
        r2.x = cmp(0 != IBLUseLastProxyVolume.w);
        if (r2.x != 0) {
          r10.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
          r2.x = (int)r10.y | (int)r10.x;
          r2.x = (int)r10.z | (int)r2.x;
          r11.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
          r11.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r11.xyz;
          r12.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
          r12.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r12.xyz;
          r12.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r12.xyz;
          r12.xyz = IBLLastProxyOBB0._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);
          r3.w = min(r11.y, r11.z);
          r3.w = min(r11.x, r3.w);
          r3.w = r10.x ? r3.w : 0;
          r11.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
          r11.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r11.xyz;
          r12.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
          r12.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r12.xyz;
          r12.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r12.xyz;
          r12.xyz = IBLLastProxyOBB1._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 = r10.y ? r4.w : 0;
          r10.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
          r10.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r10.xyw;
          r10.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r10.xyw;
          r11.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
          r11.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r11.xyz;
          r11.xyz = IBLLastProxyOBB2._m03_m13_m23 + r11.xyz;
          r12.xyz = float3(1,1,1) + -r11.xyz;
          r12.xyz = r12.xyz / r10.xyw;
          r11.xyz = float3(-1,-1,-1) + -r11.xyz;
          r10.xyw = r11.xyz / r10.xyw;
          r10.xyw = max(r12.xyz, r10.xyw);
          r5.w = min(r10.y, r10.w);
          r5.w = min(r10.x, r5.w);
          r5.w = r10.z ? r5.w : 0;
          r3.w = max(r4.w, r3.w);
          r3.w = max(r3.w, r5.w);
          r10.xyz = r0.xyz * r3.www + r3.xyz;
          r10.xyz = -IBLPositionAndWeight2.xyz + r10.xyz;
          r10.xyz = r2.xxx ? r10.xyz : r0.xyz;
          r2.x = dot(r10.xyz, r10.xyz);
          r2.x = rsqrt(r2.x);
          r10.xyz = r10.xyz * r2.xxx;
          r10.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r10.xyz, r0.w).xyz;
          r10.xyz = r10.xyz + -r9.xyz;
          r9.xyz = IBLUseLastProxyVolume.www * r10.xyz + r9.xyz;
        }
        r1.xyz = r9.xyz * IBLPositionAndWeight2.www + r1.xyz;
      }
      r2.x = cmp(0 != IBLPositionAndWeight3.w);
      if (r2.x != 0) {
        r2.x = dot(r0.xyz, r0.xyz);
        r2.x = rsqrt(r2.x);
        r9.xyz = r2.xxx * r0.xyz;
        r9.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r9.xyz, r0.w).xyz;
        r2.x = cmp(0 != IBLUseLastProxyVolume.w);
        if (r2.x != 0) {
          r10.xyz = cmp(float3(0,0,0) != IBLUseLastProxyVolume.xyz);
          r2.x = (int)r10.y | (int)r10.x;
          r2.x = (int)r10.z | (int)r2.x;
          r11.xyz = IBLLastProxyOBB0._m01_m11_m21 * r0.yyy;
          r11.xyz = IBLLastProxyOBB0._m00_m10_m20 * r0.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB0._m02_m12_m22 * r0.zzz + r11.xyz;
          r12.xyz = IBLLastProxyOBB0._m01_m11_m21 * r3.yyy;
          r12.xyz = IBLLastProxyOBB0._m00_m10_m20 * r3.xxx + r12.xyz;
          r12.xyz = IBLLastProxyOBB0._m02_m12_m22 * r3.zzz + r12.xyz;
          r12.xyz = IBLLastProxyOBB0._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);
          r3.w = min(r11.y, r11.z);
          r3.w = min(r11.x, r3.w);
          r3.w = r10.x ? r3.w : 0;
          r11.xyz = IBLLastProxyOBB1._m01_m11_m21 * r0.yyy;
          r11.xyz = IBLLastProxyOBB1._m00_m10_m20 * r0.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB1._m02_m12_m22 * r0.zzz + r11.xyz;
          r12.xyz = IBLLastProxyOBB1._m01_m11_m21 * r3.yyy;
          r12.xyz = IBLLastProxyOBB1._m00_m10_m20 * r3.xxx + r12.xyz;
          r12.xyz = IBLLastProxyOBB1._m02_m12_m22 * r3.zzz + r12.xyz;
          r12.xyz = IBLLastProxyOBB1._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 = r10.y ? r4.w : 0;
          r10.xyw = IBLLastProxyOBB2._m01_m11_m21 * r0.yyy;
          r10.xyw = IBLLastProxyOBB2._m00_m10_m20 * r0.xxx + r10.xyw;
          r10.xyw = IBLLastProxyOBB2._m02_m12_m22 * r0.zzz + r10.xyw;
          r11.xyz = IBLLastProxyOBB2._m01_m11_m21 * r3.yyy;
          r11.xyz = IBLLastProxyOBB2._m00_m10_m20 * r3.xxx + r11.xyz;
          r11.xyz = IBLLastProxyOBB2._m02_m12_m22 * r3.zzz + r11.xyz;
          r11.xyz = IBLLastProxyOBB2._m03_m13_m23 + r11.xyz;
          r12.xyz = float3(1,1,1) + -r11.xyz;
          r12.xyz = r12.xyz / r10.xyw;
          r11.xyz = float3(-1,-1,-1) + -r11.xyz;
          r10.xyw = r11.xyz / r10.xyw;
          r10.xyw = max(r12.xyz, r10.xyw);
          r5.w = min(r10.y, r10.w);
          r5.w = min(r10.x, r5.w);
          r5.w = r10.z ? r5.w : 0;
          r3.w = max(r4.w, r3.w);
          r3.w = max(r3.w, r5.w);
          r3.xyz = r0.xyz * r3.www + r3.xyz;
          r3.xyz = -IBLPositionAndWeight3.xyz + r3.xyz;
          r3.xyz = r2.xxx ? r3.xyz : r0.xyz;
          r2.x = dot(r3.xyz, r3.xyz);
          r2.x = rsqrt(r2.x);
          r3.xyz = r3.xyz * r2.xxx;
          r3.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r3.xyz, r0.w).xyz;
          r3.xyz = r3.xyz + -r9.xyz;
          r9.xyz = IBLUseLastProxyVolume.www * r3.xyz + r9.xyz;
        }
        r1.xyz = r9.xyz * IBLPositionAndWeight3.www + r1.xyz;
      }
      r1.xyz = r1.xyz + -r2.yzw;
      r2.yzw = IBLUseLastProxyVolume.www * r1.xyz + r2.yzw;
    }
  }
  r1.x = cmp(0 != ForcedIBLWeight);
  if (r1.x != 0) {
    r1.xyz = ForcedIBLCubemap.SampleLevel(ForcedIBLCubemapSampler_s, r0.xyz, r0.w).xyz;
    r1.xyz = r1.xyz + -r2.yzw;
    r2.yzw = ForcedIBLWeight * r1.xyz + r2.yzw;
  }
  r1.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r0.xyz, 7).xyz;
  r1.x = r1.x + r1.y;
  r1.x = r1.x + r1.z;
  r1.x = cmp(0.00300000003 < r1.x);
  r1.xyz = r1.xxx ? float3(0,0,0) : r2.yzw;
  r2.x = saturate(dot(r6.xyz, r5.xyz));
  r3.xyzw = r1.wwww * float4(-1,-0.0274999999,-0.572000027,0.0219999999) + float4(1,0.0425000004,1.03999996,-0.0399999991);
  r1.w = r3.x * r3.x;
  r2.x = -9.27999973 * r2.x;
  r2.x = exp2(r2.x);
  r1.w = min(r2.x, r1.w);
  r1.w = r1.w * r3.x + r3.y;
  r2.xy = r1.ww * float2(-1.03999996,1.03999996) + r3.zw;
  r1.w = saturate(50 * r7.y);
  r1.w = r2.y * r1.w;
  r2.xyz = r7.xyz * r2.xxx + r1.www;
  r1.xyz = r2.xyz * r1.xyz;
  r1.xyz = r4.xyz * EmissiveMultiplier + r1.xyz;
  r1.xyz = r8.xyz * AmbientColorAndSkyFactor.xyz + r1.xyz;
  r1.w = cmp(0 < AdditionalReflections);
  if (r1.w != 0) {
    r0.xyz = AmbientReflectionCubemap.SampleLevel(AmbientReflectionCubemapSampler_s, r0.xyz, r0.w).xyz;
    r0.xyz = r0.xyz * r2.xyz;
    r1.xyz = r0.xyz * AdditionalReflections + r1.xyz;
  }
  r0.x = cmp(AdditionalReflections < 0);
  r0.yzw = r1.xyz / -AdditionalReflections;
  r0.xyz = r0.xxx ? r0.yzw : r1.xyz;
  o0.xyz = r0.xyz * v4.www + v4.xyz;
  o0.w = UniformPixelScalars_5.y;
  return;
}