// DLC 2 drop water
TextureCubeArray<float4> t6 : register(t6);

Texture2D<float4> t5 : register(t5);

Texture3D<float4> t4 : register(t4);

Texture3D<float4> t3 : register(t3);

Texture3D<float4> t2 : register(t2);

Texture3D<float4> t1 : register(t1);

TextureCube<float4> t0 : register(t0);

SamplerState s5_s : register(s5);

SamplerState s4_s : register(s4);

SamplerState s3_s : register(s3);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb4 : register(b4)
{
  float4 cb4[4];
}

cbuffer cb3 : register(b3)
{
  float4 cb3[15];
}

cbuffer cb2 : register(b2)
{
  float4 cb2[10];
}

cbuffer cb1 : register(b1)
{
  float4 cb1[157];
}

cbuffer cb0 : register(b0)
{
  float4 cb0[27];
}




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

void main(
  float4 v0 : TEXCOORD0,
  float4 v1 : TEXCOORD4,
  float4 v2 : TEXCOORD5,
  float3 v3 : PARTICLE_LIGHTING_OFFSET0,
  float4 v4 : TANGENTX0,
  float4 v5 : TANGENTZ0,
  float4 v6 : TEXCOORD7,
  float4 v7 : 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,r14;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyz = v5.zxy * v4.yzx;
  r0.xyz = v5.yzx * v4.zxy + -r0.xyz;
  r0.xyz = v5.www * r0.xyz;
  r1.xyzw = cb1[37].xyzw * v7.yyyy;
  r1.xyzw = v7.xxxx * cb1[36].xyzw + r1.xyzw;
  r1.xyzw = v7.zzzz * cb1[38].xyzw + r1.xyzw;
  r1.xyzw = cb1[39].xyzw + r1.xyzw;
  r1.xyz = r1.xyz / r1.www;
  
  // Common SVPositionToTranslatedWorld fix:
float4 s = StereoParams.Load(0);
matrix TranslatedWorldToClip = MATRIX(cb1, 0);
matrix ClipToTranslatedWorld = MATRIX(cb1, 32);
float4 t = mul(r1.xyz, TranslatedWorldToClip);
t.x -= s.x * (t.w - s.y);
r1.xyz = mul(t, ClipToTranslatedWorld);
  
  r2.xyz = -cb1[56].xyz + r1.xyz;
  r0.w = dot(-r1.xyz, -r1.xyz);
  r0.w = rsqrt(r0.w);
  r1.xyz = -r1.xyz * r0.www;
  r3.xyz = cb1[120].www * float3(0,0,1) + cb1[120].xyz;
  r0.w = dot(r3.xyz, r3.xyz);
  r0.w = rsqrt(r0.w);
  r3.xyz = r3.xyz * r0.www;
  r0.xyz = r3.yyy * r0.xyz;
  r0.xyz = r3.xxx * v4.xyz + r0.xyz;
  r0.xyz = r3.zzz * v5.xyz + r0.xyz;
  r0.w = dot(r0.xyz, r0.xyz);
  r0.w = rsqrt(r0.w);
  r0.xyz = r0.xyz * r0.www;
  r3.xyz = t0.Sample(s0_s, r1.xyz).xyz;
  r4.xyz = float3(1,1,1) + v2.xyz;
  r3.xyz = r3.xyz * r4.xyz + float3(0.400000006,0.400000006,0.400000006);
  r3.xyz = saturate(cb4[3].xyz * r3.xyz);
  r4.xy = float2(-0.5,-0.5) + v0.xy;
  r1.w = dot(r4.xy, r4.xy);
  r1.w = sqrt(r1.w);
  r1.w = -r1.w * 2 + 1;
  r3.w = 2.33299994 * r1.w;
  r3.w = r3.w * r3.w;
  r3.w = 1.44269514 * r3.w;
  r3.w = exp2(r3.w);
  r3.w = 1 / r3.w;
  r4.x = cmp(9.99999975e-006 < abs(r1.w));
  r1.w = cmp(r1.w >= 0);
  r3.w = 1 + -r3.w;
  r3.w = saturate(v2.w * r3.w);
  r4.y = cb1[121].y * 0.0399999991 + cb1[121].x;
  r1.w = r1.w ? r3.w : 0;
  r5.w = r1.w ? r4.x : 0;
  r3.xyz = r3.xyz * cb1[118].www + cb1[118].xyz;
  r4.xzw = cb1[119].www * float3(0.0399999991,0.0399999991,0.0399999991) + cb1[119].xyz;
  r6.xyz = r0.yzy * r0.yzx;
  r7.yw = r0.zz * r0.yx;
  r1.w = r0.x * r0.x + -r6.x;
  r8.yzw = float3(-1.02332771,1.02332771,-1.02332771) * r0.yzx;
  r7.xz = r6.zy * float2(1,3) + float2(0,-1);
  r6.xyzw = float4(0.858085215,-0.858085215,0.247708291,-0.858085215) * r7.xyzw;
  r1.w = 0.429042608 * r1.w;
  r8.x = 0.886227548;
  r3.w = dot(cb3[8].xyzw, r8.xyzw);
  r7.x = dot(cb3[11].xyzw, r6.xyzw);
  r3.w = r7.x + r3.w;
  r7.x = cb3[14].x * r1.w + r3.w;
  r3.w = dot(cb3[9].xyzw, r8.xyzw);
  r7.w = dot(cb3[12].xyzw, r6.xyzw);
  r3.w = r7.w + r3.w;
  r7.y = cb3[14].y * r1.w + r3.w;
  r3.w = dot(cb3[10].xyzw, r8.xyzw);
  r6.x = dot(cb3[13].xyzw, r6.xyzw);
  r3.w = r6.x + r3.w;
  r7.z = cb3[14].z * r1.w + r3.w;
  r6.xyz = max(float3(0,0,0), r7.xyz);
  r7.xyz = cb1[138].xyz * r6.xyz;
  r1.w = cmp(0 < cb1[126].x);
  if (r1.w == 0) {
    r3.w = -2 + cb1[156].z;
    r0.w = asint(cb0[18].y);
    r9.xyz = t6.SampleLevel(s5_s, r0.xyzw, r3.w).xyz;
    r7.xyz = r6.xyz * cb1[138].xyz + r9.xyz;
  }
  r0.w = dot(r7.xyz, float3(0.300000012,0.589999974,0.109999999));
  r6.xyz = v3.xyz + r2.xyz;
  r9.xyz = -cb1[129].xyz + r6.xyz;
  r10.xyz = cb1[131].xyz * r9.xyz;
  r6.xyz = -cb1[130].xyz + r6.xyz;
  r6.xyz = cb1[132].xyz * r6.xyz;
  r9.xyz = r9.xyz * cb1[131].xyz + float3(-0.5,-0.5,-0.5);
  r9.xyz = float3(0.5,0.5,0.5) + -abs(r9.xyz);
  r9.xyz = saturate(float3(6,6,6) * r9.xyz);
  r3.w = r9.x * r9.y;
  r3.w = r3.w * r9.z;
  r9.xyz = t1.SampleLevel(s1_s, r10.xyz, 0).xyz;
  r11.xyz = t2.SampleLevel(s2_s, r6.xyz, 0).xyz;
  r9.xyz = -r11.xyz + r9.xyz;
  r9.xyz = r3.www * r9.xyz + r11.xyz;
  r10.xyz = t3.SampleLevel(s3_s, r10.xyz, 0).xyz;
  r6.xyz = t4.SampleLevel(s4_s, r6.xyz, 0).xyz;
  r10.xyz = r10.xyz + -r6.xyz;
  r6.xyz = r3.www * r10.xyz + r6.xyz;
  r3.w = dot(r9.xyz, float3(0.300000012,0.589999974,0.109999999));
  r10.xyz = r9.xyz / r3.www;
  r11.yzw = r10.xxx * r6.xyz;
  r12.yzw = r10.yyy * r6.xyz;
  r6.yzw = r10.zzz * r6.xyz;
  r11.x = r9.x;
  r10.x = dot(r11.xyzw, r8.xyzw);
  r12.x = r9.y;
  r10.y = dot(r12.xyzw, r8.xyzw);
  r6.x = r9.z;
  r10.z = dot(r6.xyzw, r8.xyzw);
  r6.xyz = max(float3(0,0,0), r10.xyz);
  r3.w = dot(r1.xyz, r0.xyz);
  r6.w = saturate(r3.w);
  r8.xyz = -cb0[19].xyz + r2.xyz;
  r7.w = dot(r8.xyz, r8.xyz);
  r8.w = sqrt(r7.w);
  r9.x = cmp(r8.w < cb0[19].w);
  if (r9.x != 0) {
    r3.w = r3.w + r3.w;
    r1.xyz = r3.www * r0.xyz + -r1.xyz;
    r3.w = saturate(r8.w / cb0[19].w);
    r8.w = cmp(0 < cb0[20].x);
    r9.xyz = cb0[22].xyz * r2.yyy;
    r9.xyz = r2.xxx * cb0[21].xyz + r9.xyz;
    r9.xyz = r2.zzz * cb0[23].xyz + r9.xyz;
    r9.xyz = cb0[24].xyz + r9.xyz;
    r10.xyz = cb0[22].xyz * r1.yyy;
    r10.xyz = r1.xxx * cb0[21].xyz + r10.xyz;
    r10.xyz = r1.zzz * cb0[23].xyz + r10.xyz;
    r10.xyz = rcp(r10.xyz);
    r11.xyz = -r9.xyz * r10.xyz + -r10.xyz;
    r10.xyz = -r9.xyz * r10.xyz + r10.xyz;
    r10.xyz = max(r11.xyz, r10.xyz);
    r9.w = min(r10.y, r10.z);
    r9.w = min(r10.x, r9.w);
    r10.xyz = r9.www * r1.xyz + r2.xyz;
    r11.xyz = cb0[26].xyz + cb0[19].xyz;
    r10.yzw = -r11.xyz + r10.xyz;
    r9.w = 0.699999988 * cb0[25].w;
    r11.xyz = -cb0[25].www * float3(0.5,0.5,0.5) + cb0[25].xyz;
    r12.xyz = cb0[25].xyz * r9.xyz;
    r13.xyz = cmp(r12.xyz < -r11.xyz);
    r14.xyz = r9.xyz * cb0[25].xyz + r11.xyz;
    r14.xyz = abs(r14.xyz);
    r13.xyz = r13.xyz ? r14.xyz : 0;
    r12.xyz = cmp(r11.xyz < r12.xyz);
    r9.xyz = r9.xyz * cb0[25].xyz + -r11.xyz;
    r9.xyz = abs(r9.xyz);
    r9.xyz = r12.xyz ? r9.xyz : 0;
    r11.x = dot(r13.xyz, float3(1,1,1));
    r9.x = dot(r9.xyz, float3(1,1,1));
    r9.x = r11.x + r9.x;
    r9.y = 1 / r9.w;
    r9.x = saturate(r9.x * r9.y);
    r9.y = r9.x * -2 + 3;
    r9.x = r9.x * r9.x;
    r10.x = -r9.y * r9.x + 1;
    r9.x = dot(r1.xyz, r8.xyz);
    r7.w = -cb0[19].w * cb0[19].w + r7.w;
    r7.w = r9.x * r9.x + -r7.w;
    r7.w = sqrt(r7.w);
    r7.w = r7.w + -r9.x;
    r1.xyz = r7.www * r1.xyz + r8.xyz;
    r9.yzw = -cb0[26].xyz + r1.xyz;
    r1.x = r3.w * 2.5 + -1.5;
    r1.x = max(0, r1.x);
    r1.y = r1.x * r1.x;
    r1.x = -r1.x * 2 + 3;
    r9.x = -r1.y * r1.x + 1;
    r8.xyzw = r8.wwww ? r10.xyzw : r9.xyzw;
    r1.x = log2(r4.y);
    r1.x = -r1.x * 1.20000005 + 1;
    r1.y = -1 + cb1[156].z;
    r1.x = r1.y + -r1.x;
    r9.w = asint(cb0[18].y);
    r9.xyz = r8.yzw;
    r1.xyz = t6.SampleLevel(s5_s, r9.xyzw, r1.x).xyz;
    r1.xyz = r1.xyz * r8.xxx;
  } else {
    r1.xyz = float3(0,0,0);
  }
  r8.xyz = r1.xyz * r0.www;
  r1.xyz = r1.www ? r8.xyz : r1.xyz;
  r8.xyzw = r4.yyyy * float4(-1,-0.0274999999,-0.572000027,0.0219999999) + float4(1,0.0425000004,1.03999996,-0.0399999991);
  r0.w = r8.x * r8.x;
  r1.w = -9.27999973 * r6.w;
  r1.w = exp2(r1.w);
  r0.w = min(r1.w, r0.w);
  r0.w = r0.w * r8.x + r8.y;
  r8.xy = r0.ww * float2(-1.03999996,1.03999996) + r8.zw;
  r0.w = 50 * r4.z;
  r0.w = saturate(r0.w);
  r0.w = r8.y * r0.w;
  r8.xyz = r4.xzw * r8.xxx + r0.www;
  r0.w = dot(cb0[4].xyz, float3(1,1,1));
  r0.w = cmp(9.99999975e-005 < abs(r0.w));
  if (r0.w != 0) {
    r2.w = -1;
    r0.w = dot(cb0[4].xyzw, r2.xyzw);
    r0.w = saturate(abs(r0.w) * cb0[11].x + cb0[11].y);
    r0.w = 1 + -r0.w;
    r9.xyz = -cb0[5].xyz + r2.xyz;
    r1.w = dot(r9.xyz, cb0[6].xyz);
    r1.w = cb0[6].w + -abs(r1.w);
    r1.w = saturate(cb0[11].x * r1.w);
    r2.w = dot(r9.xyz, cb0[7].xyz);
    r2.w = cb0[7].w + -abs(r2.w);
    r2.w = saturate(cb0[11].x * r2.w);
    r1.w = r2.w * r1.w;
    r0.w = r1.w * r0.w;
    r1.w = cmp(0 < r0.w);
    if (r1.w != 0) {
      r9.xyz = -cb1[53].xyz + r2.xyz;
      r1.w = dot(r9.xyz, r9.xyz);
      r1.w = rsqrt(r1.w);
      r9.xyz = r9.xyz * r1.www;
      r1.w = dot(r9.xyz, -cb0[4].xyz);
      r1.w = r1.w + r1.w;
      r9.xyz = cb0[4].xyz * r1.www + r9.xyz;
      r10.xyz = cb0[9].xyz * r0.yyy;
      r10.xyz = r0.xxx * cb0[8].xyz + r10.xyz;
      r10.xyz = r0.zzz * cb0[10].xyz + r10.xyz;
      r1.w = dot(r9.xyz, r10.xyz);
      r1.w = r1.w + r1.w;
      r9.xyz = r10.xyz * -r1.www + r9.xyz;
      r9.xyz = r9.xyz * cb0[11].zzz + r2.xyz;
      r9.xyz = cb1[56].xyz + r9.xyz;
      r10.xyz = cb1[9].xyz * r9.yyy;
      r9.xyw = r9.xxx * cb1[8].xyz + r10.xyz;
      r9.xyz = r9.zzz * cb1[10].xyz + r9.xyw;
      r9.xyz = cb1[11].xyz + r9.xyz;
      r10.xyz = cb0[14].xyw * r9.yyy;
      r9.xyw = r9.xxx * cb0[13].xyw + r10.xyz;
      r9.xyz = r9.zzz * cb0[15].xyw + r9.xyw;
      r9.xyz = cb0[16].xyw + r9.xyz;
      r9.xy = r9.xy / r9.zz;
      r9.xy = r9.xy * float2(0.5,-0.5) + float2(0.5,0.5);
      r0.x = dot(cb0[4].xyz, r0.xyz);
      r0.x = saturate(r0.x * cb0[12].x + cb0[12].y);
      r0.y = -0.200000003 + r4.y;
      r0.y = saturate(10 * r0.y);
      r0.y = 1 + -r0.y;
      r0.x = r0.w * r0.x;
      r0.x = r0.x * r0.y;
      r9.xyzw = t5.SampleLevel(s5_s, r9.xy, 0).xyzw;
      r0.x = r9.w * r0.x;
      r0.yzw = r9.xyz * r0.xxx;
    } else {
      r0.xyzw = float4(0,0,0,0);
    }
    r0.x = 1 + -r0.x;
    r1.xyz = r0.xxx * r1.xyz + r0.yzw;
  }
  r0.xyz = r1.xyz * r8.xyz;
  r0.xyz = r3.xyz * r6.xyz + r0.xyz;
  r0.xyz = r7.xyz * r3.xyz + r0.xyz;
  r1.xyz = r4.xzw * float3(0.449999988,0.449999988,0.449999988) + r3.xyz;
  r1.xyz = r1.xyz + -r0.xyz;
  r0.xyz = cb1[126].yyy * r1.xyz + r0.xyz;
  r5.xyz = max(float3(0,0,0), cb4[2].xyz);
  r0.w = cmp(0 < cb1[122].x);
  if (r0.w != 0) {
    r1.xyz = -cb2[8].xyz + r2.xyz;
    r3.xyz = float3(1,1,1) + cb2[9].xyz;
    r1.xyz = cmp(r3.xyz < abs(r1.xyz));
    r0.w = (int)r1.y | (int)r1.x;
    r0.w = (int)r1.z | (int)r0.w;
    r1.x = dot(r2.xyz, float3(0.577000022,0.577000022,0.577000022));
    r1.x = 0.00200000009 * r1.x;
    r1.x = frac(r1.x);
    r1.x = cmp(0.5 < r1.x);
    r1.yzw = r1.xxx ? float3(0,1,1) : float3(1,1,0);
    r1.x = 1;
    r5.xyzw = r0.wwww ? r1.yzwx : r5.xyzw;
  }
  r0.xyz = r5.xyz + r0.xyz;
  r0.xyz = v6.www * r0.xyz;
  o0.xyz = r0.xyz * r5.www;
  o0.w = 0;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.67 on Sat Nov 18 08:19:19 2017
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float   xy  
// TEXCOORD                 4   xyz         1     NONE   float       
// TEXCOORD                 5   xyzw        2     NONE   float   xyzw
// PARTICLE_LIGHTING_OFFSET     0   xyz         3     NONE   float   xyz 
// TANGENTX                 0   xyzw        4     NONE   float   xyz 
// TANGENTZ                 0   xyzw        5     NONE   float   xyzw
// TEXCOORD                 7   xyzw        6     NONE   float      w
// SV_Position              0   xyzw        7      POS   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
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[27], immediateIndexed
dcl_constantbuffer cb1[157], immediateIndexed
dcl_constantbuffer cb2[10], immediateIndexed
dcl_constantbuffer cb3[15], immediateIndexed
dcl_constantbuffer cb4[4], 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_resource_texturecube (float,float,float,float) t0
dcl_resource_texture3d (float,float,float,float) t1
dcl_resource_texture3d (float,float,float,float) t2
dcl_resource_texture3d (float,float,float,float) t3
dcl_resource_texture3d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texturecubearray (float,float,float,float) t6
dcl_input_ps linear v0.xy
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyzw
dcl_input_ps linear v6.w
dcl_input_ps_siv linear noperspective v7.xyz, position
dcl_output o0.xyzw
dcl_temps 15
mul r0.xyz, v4.yzxy, v5.zxyz
mad r0.xyz, v5.yzxy, v4.zxyz, -r0.xyzx
mul r0.xyz, r0.xyzx, v5.wwww
mul r1.xyzw, v7.yyyy, cb1[37].xyzw
mad r1.xyzw, v7.xxxx, cb1[36].xyzw, r1.xyzw
mad r1.xyzw, v7.zzzz, cb1[38].xyzw, r1.xyzw
add r1.xyzw, r1.xyzw, cb1[39].xyzw
div r1.xyz, r1.xyzx, r1.wwww
add r2.xyz, r1.xyzx, -cb1[56].xyzx
dp3 r0.w, -r1.xyzx, -r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, -r1.xyzx
mad r3.xyz, cb1[120].wwww, l(0.000000, 0.000000, 1.000000, 0.000000), cb1[120].xyzx
dp3 r0.w, r3.xyzx, r3.xyzx
rsq r0.w, r0.w
mul r3.xyz, r0.wwww, r3.xyzx
mul r0.xyz, r0.xyzx, r3.yyyy
mad r0.xyz, r3.xxxx, v4.xyzx, r0.xyzx
mad r0.xyz, r3.zzzz, v5.xyzx, r0.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
sample_indexable(texturecube)(float,float,float,float) r3.xyz, r1.xyzx, t0.xyzw, s0
add r4.xyz, v2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r3.xyz, r3.xyzx, r4.xyzx, l(0.400000, 0.400000, 0.400000, 0.000000)
mul_sat r3.xyz, r3.xyzx, cb4[3].xyzx
add r4.xy, v0.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
dp2 r1.w, r4.xyxx, r4.xyxx
sqrt r1.w, r1.w
mad r1.w, -r1.w, l(2.000000), l(1.000000)
mul r3.w, r1.w, l(2.333000)
mul r3.w, r3.w, r3.w
mul r3.w, r3.w, l(1.44269514)
exp r3.w, r3.w
div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
lt r4.x, l(0.000010), |r1.w|
ge r1.w, r1.w, l(0.000000)
add r3.w, -r3.w, l(1.000000)
mul_sat r3.w, r3.w, v2.w
mad r4.y, cb1[121].y, l(0.040000), cb1[121].x
and r1.w, r1.w, r3.w
and r5.w, r1.w, r4.x
mad r3.xyz, r3.xyzx, cb1[118].wwww, cb1[118].xyzx
mad r4.xzw, cb1[119].wwww, l(0.040000, 0.000000, 0.040000, 0.040000), cb1[119].xxyz
mul r6.xyz, r0.yzxy, r0.yzyy
mul r7.yw, r0.yyyx, r0.zzzz
mad r1.w, r0.x, r0.x, -r6.x
mul r8.yzw, r0.yyzx, l(0.000000, -1.02332771, 1.02332771, -1.02332771)
mad r7.xz, r6.zzyz, l(1.000000, 0.000000, 3.000000, 0.000000), l(0.000000, 0.000000, -1.000000, 0.000000)
mul r6.xyzw, r7.xyzw, l(0.858085215, -0.858085215, 0.247708291, -0.858085215)
mul r1.w, r1.w, l(0.429042608)
mov r8.x, l(0.886227548)
dp4 r3.w, cb3[8].xyzw, r8.xyzw
dp4 r7.x, cb3[11].xyzw, r6.xyzw
add r3.w, r3.w, r7.x
mad r7.x, cb3[14].x, r1.w, r3.w
dp4 r3.w, cb3[9].xyzw, r8.xyzw
dp4 r7.w, cb3[12].xyzw, r6.xyzw
add r3.w, r3.w, r7.w
mad r7.y, cb3[14].y, r1.w, r3.w
dp4 r3.w, cb3[10].xyzw, r8.xyzw
dp4 r6.x, cb3[13].xyzw, r6.xyzw
add r3.w, r3.w, r6.x
mad r7.z, cb3[14].z, r1.w, r3.w
max r6.xyz, r7.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r7.xyz, r6.xyzx, cb1[138].xyzx
lt r1.w, l(0.000000), cb1[126].x
if_z r1.w
  add r3.w, cb1[156].z, l(-2.000000)
  itof r0.w, cb0[18].y
  sample_l_indexable(texturecubearray)(float,float,float,float) r9.xyz, r0.xyzw, t6.xyzw, s5, r3.w
  mad r7.xyz, r6.xyzx, cb1[138].xyzx, r9.xyzx
endif 
dp3 r0.w, r7.xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
add r6.xyz, r2.xyzx, v3.xyzx
add r9.xyz, r6.xyzx, -cb1[129].xyzx
mul r10.xyz, r9.xyzx, cb1[131].xyzx
add r6.xyz, r6.xyzx, -cb1[130].xyzx
mul r6.xyz, r6.xyzx, cb1[132].xyzx
mad r9.xyz, r9.xyzx, cb1[131].xyzx, l(-0.500000, -0.500000, -0.500000, 0.000000)
add r9.xyz, -|r9.xyzx|, l(0.500000, 0.500000, 0.500000, 0.000000)
mul_sat r9.xyz, r9.xyzx, l(6.000000, 6.000000, 6.000000, 0.000000)
mul r3.w, r9.y, r9.x
mul r3.w, r9.z, r3.w
sample_l_indexable(texture3d)(float,float,float,float) r9.xyz, r10.xyzx, t1.xyzw, s1, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r11.xyz, r6.xyzx, t2.xyzw, s2, l(0.000000)
add r9.xyz, r9.xyzx, -r11.xyzx
mad r9.xyz, r3.wwww, r9.xyzx, r11.xyzx
sample_l_indexable(texture3d)(float,float,float,float) r10.xyz, r10.xyzx, t3.xyzw, s3, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r6.xyz, r6.xyzx, t4.xyzw, s4, l(0.000000)
add r10.xyz, -r6.xyzx, r10.xyzx
mad r6.xyz, r3.wwww, r10.xyzx, r6.xyzx
dp3 r3.w, r9.xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
div r10.xyz, r9.xyzx, r3.wwww
mul r11.yzw, r6.xxyz, r10.xxxx
mul r12.yzw, r6.xxyz, r10.yyyy
mul r6.yzw, r6.xxyz, r10.zzzz
mov r11.x, r9.x
dp4 r10.x, r11.xyzw, r8.xyzw
mov r12.x, r9.y
dp4 r10.y, r12.xyzw, r8.xyzw
mov r6.x, r9.z
dp4 r10.z, r6.xyzw, r8.xyzw
max r6.xyz, r10.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
dp3 r3.w, r1.xyzx, r0.xyzx
mov_sat r6.w, r3.w
add r8.xyz, r2.xyzx, -cb0[19].xyzx
dp3 r7.w, r8.xyzx, r8.xyzx
sqrt r8.w, r7.w
lt r9.x, r8.w, cb0[19].w
if_nz r9.x
  add r3.w, r3.w, r3.w
  mad r1.xyz, r3.wwww, r0.xyzx, -r1.xyzx
  div_sat r3.w, r8.w, cb0[19].w
  lt r8.w, l(0.000000), cb0[20].x
  mul r9.xyz, r2.yyyy, cb0[22].xyzx
  mad r9.xyz, r2.xxxx, cb0[21].xyzx, r9.xyzx
  mad r9.xyz, r2.zzzz, cb0[23].xyzx, r9.xyzx
  add r9.xyz, r9.xyzx, cb0[24].xyzx
  mul r10.xyz, r1.yyyy, cb0[22].xyzx
  mad r10.xyz, r1.xxxx, cb0[21].xyzx, r10.xyzx
  mad r10.xyz, r1.zzzz, cb0[23].xyzx, r10.xyzx
  rcp r10.xyz, r10.xyzx
  mad r11.xyz, -r9.xyzx, r10.xyzx, -r10.xyzx
  mad r10.xyz, -r9.xyzx, r10.xyzx, r10.xyzx
  max r10.xyz, r10.xyzx, r11.xyzx
  min r9.w, r10.z, r10.y
  min r9.w, r9.w, r10.x
  mad r10.xyz, r9.wwww, r1.xyzx, r2.xyzx
  add r11.xyz, cb0[19].xyzx, cb0[26].xyzx
  add r10.yzw, r10.xxyz, -r11.xxyz
  mul r9.w, cb0[25].w, l(0.700000)
  mad r11.xyz, -cb0[25].wwww, l(0.500000, 0.500000, 0.500000, 0.000000), cb0[25].xyzx
  mul r12.xyz, r9.xyzx, cb0[25].xyzx
  lt r13.xyz, r12.xyzx, -r11.xyzx
  mad r14.xyz, r9.xyzx, cb0[25].xyzx, r11.xyzx
  mov r14.xyz, |r14.xyzx|
  and r13.xyz, r13.xyzx, r14.xyzx
  lt r12.xyz, r11.xyzx, r12.xyzx
  mad r9.xyz, r9.xyzx, cb0[25].xyzx, -r11.xyzx
  mov r9.xyz, |r9.xyzx|
  and r9.xyz, r9.xyzx, r12.xyzx
  dp3 r11.x, r13.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  dp3 r9.x, r9.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  add r9.x, r9.x, r11.x
  div r9.y, l(1.000000, 1.000000, 1.000000, 1.000000), r9.w
  mul_sat r9.x, r9.y, r9.x
  mad r9.y, r9.x, l(-2.000000), l(3.000000)
  mul r9.x, r9.x, r9.x
  mad r10.x, -r9.y, r9.x, l(1.000000)
  dp3 r9.x, r1.xyzx, r8.xyzx
  mad r7.w, -cb0[19].w, cb0[19].w, r7.w
  mad r7.w, r9.x, r9.x, -r7.w
  sqrt r7.w, r7.w
  add r7.w, -r9.x, r7.w
  mad r1.xyz, r7.wwww, r1.xyzx, r8.xyzx
  add r9.yzw, r1.xxyz, -cb0[26].xxyz
  mad r1.x, r3.w, l(2.500000), l(-1.500000)
  max r1.x, r1.x, l(0.000000)
  mul r1.y, r1.x, r1.x
  mad r1.x, -r1.x, l(2.000000), l(3.000000)
  mad r9.x, -r1.y, r1.x, l(1.000000)
  movc r8.xyzw, r8.wwww, r10.xyzw, r9.xyzw
  log r1.x, r4.y
  mad r1.x, -r1.x, l(1.200000), l(1.000000)
  add r1.y, cb1[156].z, l(-1.000000)
  add r1.x, -r1.x, r1.y
  itof r9.w, cb0[18].y
  mov r9.xyz, r8.yzwy
  sample_l_indexable(texturecubearray)(float,float,float,float) r1.xyz, r9.xyzw, t6.xyzw, s5, r1.x
  mul r1.xyz, r8.xxxx, r1.xyzx
else 
  mov r1.xyz, l(0,0,0,0)
endif 
mul r8.xyz, r0.wwww, r1.xyzx
movc r1.xyz, r1.wwww, r8.xyzx, r1.xyzx
mad r8.xyzw, r4.yyyy, l(-1.000000, -0.027500, -0.572000, 0.022000), l(1.000000, 0.042500, 1.040000, -0.040000)
mul r0.w, r8.x, r8.x
mul r1.w, r6.w, l(-9.280000)
exp r1.w, r1.w
min r0.w, r0.w, r1.w
mad r0.w, r0.w, r8.x, r8.y
mad r8.xy, r0.wwww, l(-1.040000, 1.040000, 0.000000, 0.000000), r8.zwzz
mul r0.w, r4.z, l(50.000000)
mov_sat r0.w, r0.w
mul r0.w, r0.w, r8.y
mad r8.xyz, r4.xzwx, r8.xxxx, r0.wwww
dp3 r0.w, cb0[4].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
lt r0.w, l(0.000100), |r0.w|
if_nz r0.w
  mov r2.w, l(-1.000000)
  dp4 r0.w, cb0[4].xyzw, r2.xyzw
  mad_sat r0.w, |r0.w|, cb0[11].x, cb0[11].y
  add r0.w, -r0.w, l(1.000000)
  add r9.xyz, r2.xyzx, -cb0[5].xyzx
  dp3 r1.w, r9.xyzx, cb0[6].xyzx
  add r1.w, -|r1.w|, cb0[6].w
  mul_sat r1.w, r1.w, cb0[11].x
  dp3 r2.w, r9.xyzx, cb0[7].xyzx
  add r2.w, -|r2.w|, cb0[7].w
  mul_sat r2.w, r2.w, cb0[11].x
  mul r1.w, r1.w, r2.w
  mul r0.w, r0.w, r1.w
  lt r1.w, l(0.000000), r0.w
  if_nz r1.w
    add r9.xyz, r2.xyzx, -cb1[53].xyzx
    dp3 r1.w, r9.xyzx, r9.xyzx
    rsq r1.w, r1.w
    mul r9.xyz, r1.wwww, r9.xyzx
    dp3 r1.w, r9.xyzx, -cb0[4].xyzx
    add r1.w, r1.w, r1.w
    mad r9.xyz, cb0[4].xyzx, r1.wwww, r9.xyzx
    mul r10.xyz, r0.yyyy, cb0[9].xyzx
    mad r10.xyz, r0.xxxx, cb0[8].xyzx, r10.xyzx
    mad r10.xyz, r0.zzzz, cb0[10].xyzx, r10.xyzx
    dp3 r1.w, r9.xyzx, r10.xyzx
    add r1.w, r1.w, r1.w
    mad r9.xyz, r10.xyzx, -r1.wwww, r9.xyzx
    mad r9.xyz, r9.xyzx, cb0[11].zzzz, r2.xyzx
    add r9.xyz, r9.xyzx, cb1[56].xyzx
    mul r10.xyz, r9.yyyy, cb1[9].xyzx
    mad r9.xyw, r9.xxxx, cb1[8].xyxz, r10.xyxz
    mad r9.xyz, r9.zzzz, cb1[10].xyzx, r9.xywx
    add r9.xyz, r9.xyzx, cb1[11].xyzx
    mul r10.xyz, r9.yyyy, cb0[14].xywx
    mad r9.xyw, r9.xxxx, cb0[13].xyxw, r10.xyxz
    mad r9.xyz, r9.zzzz, cb0[15].xywx, r9.xywx
    add r9.xyz, r9.xyzx, cb0[16].xywx
    div r9.xy, r9.xyxx, r9.zzzz
    mad r9.xy, r9.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
    dp3 r0.x, cb0[4].xyzx, r0.xyzx
    mad_sat r0.x, r0.x, cb0[12].x, cb0[12].y
    add r0.y, r4.y, l(-0.200000)
    mul_sat r0.y, r0.y, l(10.000000)
    add r0.y, -r0.y, l(1.000000)
    mul r0.x, r0.x, r0.w
    mul r0.x, r0.y, r0.x
    sample_l_indexable(texture2d)(float,float,float,float) r9.xyzw, r9.xyxx, t5.xyzw, s5, l(0.000000)
    mul r0.x, r0.x, r9.w
    mul r0.yzw, r0.xxxx, r9.xxyz
  else 
    mov r0.xyzw, l(0,0,0,0)
  endif 
  add r0.x, -r0.x, l(1.000000)
  mad r1.xyz, r0.xxxx, r1.xyzx, r0.yzwy
endif 
mul r0.xyz, r8.xyzx, r1.xyzx
mad r0.xyz, r3.xyzx, r6.xyzx, r0.xyzx
mad r0.xyz, r7.xyzx, r3.xyzx, r0.xyzx
mad r1.xyz, r4.xzwx, l(0.450000, 0.450000, 0.450000, 0.000000), r3.xyzx
add r1.xyz, -r0.xyzx, r1.xyzx
mad r0.xyz, cb1[126].yyyy, r1.xyzx, r0.xyzx
max r5.xyz, cb4[2].xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r0.w, l(0.000000), cb1[122].x
if_nz r0.w
  add r1.xyz, r2.xyzx, -cb2[8].xyzx
  add r3.xyz, cb2[9].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  lt r1.xyz, r3.xyzx, |r1.xyzx|
  or r0.w, r1.y, r1.x
  or r0.w, r1.z, r0.w
  dp3 r1.x, r2.xyzx, l(0.577000, 0.577000, 0.577000, 0.000000)
  mul r1.x, r1.x, l(0.002000)
  frc r1.x, r1.x
  lt r1.x, l(0.500000), r1.x
  movc r1.yzw, r1.xxxx, l(0,0,1.000000,1.000000), l(0,1.000000,1.000000,0)
  mov r1.x, l(1.000000)
  movc r5.xyzw, r0.wwww, r1.yzwx, r5.xyzw
endif 
add r0.xyz, r0.xyzx, r5.xyzx
mul r0.xyz, r0.xyzx, v6.wwww
mul o0.xyz, r5.wwww, r0.xyzx
mov o0.w, l(0)
ret 
// Approximately 0 instruction slots used

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