// SSR
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v1.3.16 on Sat May 18 09:04:43 2019
//
//
// Buffer Definitions:
//
// cbuffer CBufferGlobalConstant_Z
// {
//
//   struct StructGlobalConstant_Z
//   {
//
//       float4 c[90];                  // Offset:    0
//
//   } Global;                          // Offset:    0 Size:  1440
//
// }
//
// cbuffer CBufferScatteringConstant_Z
// {
//
//   struct StructScatteringConstant_Z
//   {
//
//       float4 c[36];                  // Offset:    0
//
//   } Scattering;                      // Offset:    0 Size:   576
//
// }
//
// cbuffer CBufferLightConstant_Z
// {
//
//   struct StructLightConstant_Z
//   {
//
//       float4 c[3];                   // Offset:    0
//
//   } Light;                           // Offset:    0 Size:    48
//
// }
//
// cbuffer CBufferRefProbeConstant_Z
// {
//
//   struct StructRefProbeConstant_Z
//   {
//
//       struct ShaderRefProbe_Z
//       {
//
//           float4 Pos;                // Offset:    0
//           float4 Value0;             // Offset:   16
//           float4 Value1;             // Offset:   32
//           float4x4 LocalToWorldMat;  // Offset:   48
//           float4x4 WorldToLocalMat;  // Offset:  112
//
//       } Elt[5];                      // Offset:    0
//
//   } RefProbeArray;                   // Offset:    0 Size:   880
//
// }
//
// cbuffer CBufferRenderStateConstant_Z
// {
//
//   struct StructRenderStateConstant_Z
//   {
//
//       float AlphaRef;                // Offset:    0
//       float NoOmni;                  // Offset:    4
//
//   } RenderState;                     // Offset:    0 Size:     8
//
// }
//
// cbuffer CBufferObjectConstant_Z
// {
//
//   struct StructObjectConstant_Z
//   {
//
//       float4 c[32];                  // Offset:    0
//
//   } Object;                          // Offset:    0 Size:   512
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// sMaterialSampler                  sampler      NA          NA    0        1
// sZBufferSampler                   sampler      NA          NA    1        1
// sLastFrameColorBufferSampler      sampler      NA          NA    2        1
// sLastFrameHiZBufferSampler        sampler      NA          NA    3        1
// sReflectionProbe0Sampler          sampler      NA          NA    4        1
// sReflectionProbe1Sampler          sampler      NA          NA    5        1
// sReflectionProbe2Sampler          sampler      NA          NA    6        1
// sReflectionProbe3Sampler          sampler      NA          NA    7        1
// sReflectionProbe4Sampler          sampler      NA          NA    8        1
// sRenderTargetSampler              sampler      NA          NA    9        1
// sFogOcclusionSampler              sampler      NA          NA   10        1
// sMipFog0Sampler                   sampler      NA          NA   11        1
// sDiffuse                          texture  float4          2d    0        1
// sNormalRoughMetal                 texture  float4          2d    1        1
// sBlendMask                        texture  float4          2d    2        1
// sZBuffer                          texture  float4          2d    3        1
// sLastFrameColorBuffer             texture  float4          2d    4        1
// sLastFrameHiZBuffer               texture  float4          2d    5        1
// sReflectionProbe0                 texture  float4        cube    6        1
// sReflectionProbe1                 texture  float4        cube    7        1
// sReflectionProbe2                 texture  float4        cube    8        1
// sReflectionProbe3                 texture  float4        cube    9        1
// sReflectionProbe4                 texture  float4        cube   10        1
// sBlueNoiseR8                      texture  float4     2darray   11        1
// sBlueNoiseR8G8                    texture  float4     2darray   12        1
// sRenderTarget                     texture  float4          2d   13        1
// sFogOcclusion                     texture  float4          2d   14        1
// sMipFog0                          texture  float4          2d   15        1
// sMipFog1                          texture  float4          2d   16        1
// VelocityBufferXY                      UAV    uint          2d    1        1
// VelocityBufferZ                       UAV   float          2d    2        1
// CBufferGlobalConstant_Z           cbuffer      NA          NA    0        1
// CBufferScatteringConstant_Z       cbuffer      NA          NA    1        1
// CBufferLightConstant_Z            cbuffer      NA          NA    2        1
// CBufferRefProbeConstant_Z         cbuffer      NA          NA    3        1
// CBufferRenderStateConstant_Z      cbuffer      NA          NA    4        1
// CBufferObjectConstant_Z           cbuffer      NA          NA    5        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xy
// PREVIOUS_POSITION        0   xyzw        1     NONE   float
// COLOR                    0   xyzw        2     NONE   float      w
// TEXCOORD                 0   xyzw        3     NONE   float   xyzw
// TEXSPACE_MAT             0   xyzw        4     NONE   float   xyzw
// TEXSPACE_MAT             1   xyzw        5     NONE   float   xyzw
// TEXSPACE_MAT             2   xyzw        6     NONE   float   xyzw
// INSTANCE_COLOR           0   x           7     NONE   float
// INSTANCE_INDEXES         0   xy          8     NONE    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[69], immediateIndexed
dcl_constantbuffer cb1[27], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_constantbuffer cb3[54], immediateIndexed
dcl_constantbuffer cb4[1], immediateIndexed
dcl_constantbuffer cb5[27], 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_sampler s9, mode_default
dcl_sampler s10, mode_default
dcl_sampler s11, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (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_texturecube (float,float,float,float) t6
dcl_resource_texturecube (float,float,float,float) t7
dcl_resource_texturecube (float,float,float,float) t8
dcl_resource_texturecube (float,float,float,float) t9
dcl_resource_texturecube (float,float,float,float) t10
dcl_resource_texture2darray (float,float,float,float) t11
dcl_resource_texture2darray (float,float,float,float) t12
dcl_resource_texture2d (float,float,float,float) t13
dcl_resource_texture2d (float,float,float,float) t14
dcl_resource_texture2d (float,float,float,float) t15
dcl_resource_texture2d (float,float,float,float) t16
dcl_uav_typed_texture2d (uint,uint,uint,uint) u1
dcl_uav_typed_texture2d (float,float,float,float) u2
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v2.w
dcl_input_ps linear v3.xyzw
dcl_input_ps linear v4.xyzw
dcl_input_ps linear v5.xyzw
dcl_input_ps linear v6.xyzw
dcl_output o0.xyzw
dcl_temps 38
dcl_resource_texture2d (float,float,float,float) t125
sample_indexable(texture2d)(float,float,float,float) r0.xyz, v3.xyxx, t2.yzwx, s0
mad r0.xz, r0.xxzx, l(-2.000000, 0.000000, 2.000000, 0.000000), l(1.000000, 0.000000, -1.000000, 0.000000)
mad r0.w, r0.y, cb5[24].y, cb0[0].y
mul r1.x, r0.w, cb5[24].y
ge r1.x, r1.x, -r1.x
movc r1.x, r1.x, cb5[24].y, -cb5[24].y
div r1.y, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
mul r0.w, r0.w, r1.y
frc r0.w, r0.w
mul r0.w, r0.w, r1.x
div r0.w, r0.w, cb5[24].y
add_sat r1.x, r0.w, r0.w
mad_sat r1.y, r0.w, l(-2.000000), l(2.000000)
mul r1.x, r1.y, r1.x
add r0.w, r0.w, l(-0.500000)
mad r1.y, cb5[24].y, l(0.500000), cb0[0].y
mad r0.y, r0.y, cb5[24].y, r1.y
div r0.y, r0.y, cb5[24].y
ge r1.y, r0.y, -r0.y
frc r0.y, |r0.y|
movc r0.y, r1.y, r0.y, -r0.y
mul r0.yw, r0.yyyw, cb5[24].yyyz
div r0.y, r0.y, cb5[24].y
add r0.y, r0.y, l(-0.500000)
mul r0.y, r0.y, cb5[24].z
mul r1.yz, v3.xxyx, cb5[24].wwww
mad r2.xy, r0.wwww, r0.xzxx, r1.yzyy
mad r0.xy, r0.yyyy, r0.xzxx, r1.yzyy
add r0.xy, r0.xyxx, cb5[24].xxxx
sample_indexable(texture2d)(float,float,float,float) r3.xyzw, r2.xyxx, t0.xyzw, s0
sample_indexable(texture2d)(float,float,float,float) r4.xyzw, r0.xyxx, t0.xyzw, s0
add r3.xyzw, r3.xyzw, -r4.xyzw
mad r3.xyzw, r1.xxxx, r3.xyzw, r4.xyzw
mul r0.z, r3.w, cb5[21].w
mul r0.z, r0.z, v2.w
ge r0.w, cb4[0].x, r0.z
discard_nz r0.w
mov r4.x, v4.w
mov r4.y, v5.w
mov r4.z, v6.w
add r1.yzw, -r4.zzxy, cb0[2].zzxy
dp3 r0.w, r1.yzwy, r1.yzwy
rsq r0.w, r0.w
mul r5.xyz, r0.wwww, r1.yzwy
mul r6.xyz, r3.xyzx, cb5[20].xyzx
sample_indexable(texture2d)(float,float,float,float) r2.xyzw, r2.xyxx, t1.xyzw, s0
sample_indexable(texture2d)(float,float,float,float) r7.xyzw, r0.xyxx, t1.xyzw, s0
add r2.xyzw, r2.xyzw, -r7.xyzw
mad r2.xyzw, r1.xxxx, r2.xyzw, r7.xyzw
mul r0.xy, r2.xzxx, cb5[23].xyxx
mad r2.yw, r2.yyyw, l(0.000000, 2.000000, 0.000000, 2.000000), l(0.000000, -1.000000, 0.000000, -1.000000)
mul r2.yw, r2.yyyw, cb5[23].zzzz
dp2 r1.x, r2.ywyy, r2.ywyy
add r1.x, -r1.x, l(1.000000)
max r1.x, r1.x, l(0.000000)
sqrt r1.x, r1.x
mul r7.xyz, r2.wwww, v5.xyzx
mad r7.xyz, r2.yyyy, v4.xyzx, r7.xyzx
mad r7.xyz, r1.xxxx, v6.xyzx, r7.xyzx
dp3 r1.x, r7.xyzx, r7.xyzx
rsq r1.x, r1.x
mul r7.xyz, r1.xxxx, r7.xyzx
mul r3.xyz, r3.xyzx, cb5[21].xyzx
mul r8.xyz, r6.xyzx, cb5[18].xyzx
mul r3.xyz, r3.xyzx, cb5[18].xyzx
dp3 r1.x, r7.zxyz, r5.xyzx
mad r2.x, -cb5[23].x, r2.x, l(1.000000)
mul r2.xyw, r2.xxxx, r8.xyxz
add r3.w, r0.y, r0.y
mad_sat r5.w, r0.y, l(2.000000), l(-1.000000)
mad r5.w, r5.w, l(-0.040000), l(0.040000)
mad r6.xyz, r6.xyzx, cb5[18].xyzx, -r5.wwww
mad r6.xyz, r0.xxxx, r6.xyzx, r5.wwww
mov_sat r0.x, r1.x
mad r8.xyzw, r0.yyyy, l(-1.000000, -0.027500, -0.572000, 0.022000), l(1.000000, 0.042500, 1.040000, -0.040000)
mul r5.w, r8.x, r8.x
mul r0.x, r0.x, l(-9.280000)
exp r0.x, r0.x
min r0.x, r0.x, r5.w
mad r0.x, r0.x, r8.x, r8.y
mad r8.xy, r0.xxxx, l(-1.040000, 1.040000, 0.000000, 0.000000), r8.zwzz
mad r8.xyz, r6.xyzx, r8.xxxx, r8.yyyy
mul_sat r0.x, r0.z, cb5[18].w
mul r9.xyz, cb2[1].xyzx, cb5[19].yyyy
dp3 r0.z, r7.xyzx, cb2[0].xyzx
dp3 r5.w, -r5.yzxy, r7.xyzx
add r5.w, r5.w, r5.w
mad r10.xyz, r7.xyzx, -r5.wwww, -r5.yzxy
dp3 r5.w, cb2[0].xyzx, r10.xyzx
mad r11.xyz, -r5.wwww, cb2[0].xyzx, r10.xyzx
lt r5.w, r5.w, l(0.999988675)
dp3 r6.w, r11.xyzx, r11.xyzx
rsq r6.w, r6.w
mul r11.xyz, r6.wwww, r11.xyzx
mul r11.xyz, r11.xyzx, l(0.00475598220, 0.00475598220, 0.00475598220, 0.000000)
mad r11.xyz, cb2[0].xyzx, l(0.999988675, 0.999988675, 0.999988675, 0.000000), r11.xyzx
dp3 r6.w, r11.xyzx, r11.xyzx
rsq r6.w, r6.w
mul r11.xyz, r6.wwww, r11.xyzx
movc r11.xyz, r5.wwww, r11.xyzx, r10.xyzx
max r5.w, r0.y, cb2[1].w
max r5.w, r5.w, l(0.080000)
mad r1.yzw, r1.zzwy, r0.wwww, r11.xxyz
dp3 r0.w, r1.yzwy, r1.yzwy
rsq r0.w, r0.w
mul r1.yzw, r0.wwww, r1.yyzw
dp3_sat r0.w, r1.yzwy, r11.xyzx
dp3_sat r1.y, r7.xyzx, r1.yzwy
dp3_sat r1.z, r7.xyzx, r11.xyzx
add r11.xyz, -r6.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r1.w, -r0.w, l(1.000000)
mul r6.w, r1.w, r1.w
mul r6.w, r6.w, r6.w
mul r1.w, r1.w, r6.w
mad r6.xyz, r11.xyzx, r1.wwww, r6.xyzx
mul r1.w, r5.w, r5.w
mul r1.w, r1.w, r1.w
mad r6.w, r1.y, r1.w, -r1.y
mad r1.y, r6.w, r1.y, l(1.000000)
mul r1.y, r1.y, r1.y
div r1.y, r1.w, r1.y
mad r11.xy, r5.wwww, l(0.500000, -0.337748349, 0.000000, 0.000000), l(0.500000, 1.000000, 0.000000, 0.000000)
mul r1.w, r11.x, r11.x
mad r6.w, -r11.x, r11.x, l(1.000000)
mad r7.w, |r1.x|, r6.w, r1.w
mad r1.w, r1.z, r6.w, r1.w
mul r1.w, r1.w, |r1.x|
mad r1.w, r1.z, r7.w, r1.w
add r1.w, r1.w, l(0.000010)
rcp r1.w, r1.w
mul r1.w, r1.w, l(0.500000)
mul r6.xyz, r1.yyyy, r6.xyzx
mul r6.xyz, r1.wwww, r6.xyzx
mul r0.w, r0.w, r0.w
dp2 r0.w, r0.wwww, r5.wwww
mad r0.w, r5.w, l(0.500000), r0.w
add r0.w, r0.w, l(-1.000000)
add r1.y, -r1.z, l(1.000000)
mul r1.w, r1.y, r1.y
mul r1.w, r1.w, r1.w
mul r1.y, r1.y, r1.w
mad r1.y, r0.w, r1.y, l(1.000000)
add r1.x, -|r1.x|, l(1.000000)
mul r1.w, r1.x, r1.x
mul r1.w, r1.w, r1.w
mul r1.x, r1.x, r1.w
mad r0.w, r0.w, r1.x, l(1.000000)
mul r0.w, r0.w, r1.y
mul r0.w, r11.y, r0.w
mul r1.xyw, r9.xyxz, r0.wwww
mov_sat r0.w, r0.z
mul r6.xyz, r9.xyzx, r6.xyzx
add r9.xyz, -r8.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r0.z, r0.z, l(-1.000000)
mad r0.z, r0.z, cb2[2].w, l(1.000000)
mad r5.w, r7.y, l(0.500000), l(0.500000)
mad r6.w, -r7.y, l(0.500000), l(0.500000)
mul r5.w, r5.w, r5.w
mul r6.w, r6.w, r6.w
mul r11.xyz, r6.wwww, cb1[26].xyzx
mad r11.xyz, r5.wwww, cb1[25].xyzx, r11.xyzx
mad r11.xyz, cb2[2].xyzx, r0.zzzz, r11.xyzx
dp3_sat r0.z, r7.xyzx, cb1[24].xyzx
mad r11.xyz, cb1[23].xyzx, r0.zzzz, r11.xyzx
mul r11.xyz, r9.xyzx, r11.xyzx
mad r1.xyw, r1.xyxw, r0.wwww, r11.xyxz
mad r1.xyw, r1.xyxw, r2.xyxw, r3.xyxz
eq r0.z, cb3[0].w, l(1.000000)
if_nz r0.z
  add r2.xyw, r4.xyxz, -cb3[0].xyxz
  dp3 r0.z, r2.xywx, r2.xywx
  sqrt r0.w, r0.z
  mul_sat r0.w, r0.w, cb3[1].y
  dp3 r2.x, r10.xyzx, r2.xywx
  add r2.y, r2.x, r2.x
  add r0.z, r0.z, -cb3[1].x
  mul r0.z, r0.z, l(4.000000)
  mad r0.z, r2.y, r2.y, -r0.z
  ge r2.y, r0.z, l(0.000000)
  if_nz r2.y
    sqrt r0.z, r0.z
    mad r0.z, -r2.x, l(2.000000), r0.z
    mul r0.z, r0.z, l(0.500000)
    mad r2.xyw, r0.zzzz, r10.xyxz, r4.xyxz
    add r11.xyz, r2.xywx, -cb3[0].xyzx
    add r0.z, r0.w, l(-0.700000)
    mul r0.z, r0.z, l(3.33333325)
    max r0.z, r0.z, l(0.000000)
    mad r0.w, r0.z, l(-2.000000), l(3.000000)
    mul r0.z, r0.z, r0.z
    mad r12.w, -r0.w, r0.z, l(1.000000)
    log r0.z, r0.y
    mad r0.z, -r0.z, l(1.800000), l(1.000000)
    add r0.z, -r0.z, l(8.000000)
    mov r11.w, -r11.z
    sample_l_indexable(texturecube)(float,float,float,float) r2.xyw, r11.xywx, t6.xywz, s4, r0.z
    mul r12.xyz, r12.wwww, r2.xywx
  else
    mov r12.xyzw, l(0,0,0,0)
  endif
else
  eq r0.z, cb3[0].w, l(2.000000)
  if_nz r0.z
    mov r4.w, l(1.000000)
    dp4 r3.x, r4.xyzw, cb3[7].xyzw
    dp4 r3.y, r4.xyzw, cb3[8].xyzw
    dp4 r3.z, r4.xyzw, cb3[9].xyzw
    add r2.xyw, r3.xyxz, r3.xyxz
    mad_sat r11.xyz, |r2.xywx|, cb3[1].xyzx, cb3[2].xyzx
    mul r0.z, r11.y, r11.x
    mul r12.w, r11.z, r0.z
    dp3 r11.x, r10.xyzx, cb3[7].xyzx
    dp3 r11.y, r10.xyzx, cb3[8].xyzx
    dp3 r11.z, r10.xyzx, cb3[9].xyzx
    mad r13.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
    div r13.xyz, r13.xyzx, r11.xyzx
    mad r3.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r3.xyz, r3.xyzx, r11.xyzx
    max r3.xyz, r3.xyzx, r13.xyzx
    min r0.z, r3.z, r3.y
    min r0.z, r0.z, r3.x
    mad r2.xyw, r11.xyxz, r0.zzzz, r2.xyxw
    add r2.xyw, r2.xyxw, -cb3[0].xyxz
    dp3 r3.x, r2.xywx, cb3[3].xyzx
    dp3 r3.y, r2.xywx, cb3[4].xyzx
    dp3 r0.z, r2.xywx, cb3[5].xyzx
    log r0.w, r0.y
    mad r0.w, -r0.w, l(1.800000), l(1.000000)
    add r0.w, -r0.w, l(8.000000)
    mov r3.z, -r0.z
    sample_l_indexable(texturecube)(float,float,float,float) r2.xyw, r3.xyzx, t6.xywz, s4, r0.w
    mul r12.xyz, r12.wwww, r2.xywx
  else
    mov r12.xyzw, l(0,0,0,0)
  endif
endif
eq r0.z, cb3[11].w, l(1.000000)
lt r0.w, r12.w, l(1.000000)
and r0.z, r0.w, r0.z
if_nz r0.z
  add r0.z, -r12.w, l(1.000000)
  add r2.xyw, r4.xyxz, -cb3[11].xyxz
  dp3 r3.x, r2.xywx, r2.xywx
  sqrt r3.y, r3.x
  mul_sat r3.y, r3.y, cb3[12].y
  dp3 r2.x, r10.xyzx, r2.xywx
  add r2.y, r2.x, r2.x
  add r2.w, r3.x, -cb3[12].x
  mul r2.w, r2.w, l(4.000000)
  mad r2.y, r2.y, r2.y, -r2.w
  ge r2.w, r2.y, l(0.000000)
  if_nz r2.w
    sqrt r2.y, r2.y
    mad r2.x, -r2.x, l(2.000000), r2.y
    mul r2.x, r2.x, l(0.500000)
    mad r2.xyw, r2.xxxx, r10.xyxz, r4.xyxz
    add r11.xyz, r2.xywx, -cb3[11].xyzx
    add r2.x, r3.y, l(-0.700000)
    mul r2.x, r2.x, l(3.33333325)
    max r2.x, r2.x, l(0.000000)
    mad r2.y, r2.x, l(-2.000000), l(3.000000)
    mul r2.x, r2.x, r2.x
    mad r13.w, -r2.y, r2.x, l(1.000000)
    log r2.x, r0.y
    mad r2.x, -r2.x, l(1.800000), l(1.000000)
    add r2.x, -r2.x, l(8.000000)
    mov r11.w, -r11.z
    sample_l_indexable(texturecube)(float,float,float,float) r2.xyw, r11.xywx, t7.xywz, s5, r2.x
    mul r13.xyz, r13.wwww, r2.xywx
  else
    mov r13.xyzw, l(0,0,0,0)
  endif
  mad r12.xyzw, r0.zzzz, r13.xyzw, r12.xyzw
else
  eq r0.z, cb3[11].w, l(2.000000)
  and r0.z, r0.w, r0.z
  if_nz r0.z
    add r0.z, -r12.w, l(1.000000)
    mov r4.w, l(1.000000)
    dp4 r3.x, r4.xyzw, cb3[18].xyzw
    dp4 r3.y, r4.xyzw, cb3[19].xyzw
    dp4 r3.z, r4.xyzw, cb3[20].xyzw
    add r2.xyw, r3.xyxz, r3.xyxz
    mad_sat r11.xyz, |r2.xywx|, cb3[12].xyzx, cb3[13].xyzx
    mul r0.w, r11.y, r11.x
    mul r11.w, r11.z, r0.w
    dp3 r13.x, r10.xyzx, cb3[18].xyzx
    dp3 r13.y, r10.xyzx, cb3[19].xyzx
    dp3 r13.z, r10.xyzx, cb3[20].xyzx
    mad r14.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
    div r14.xyz, r14.xyzx, r13.xyzx
    mad r3.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r3.xyz, r3.xyzx, r13.xyzx
    max r3.xyz, r3.xyzx, r14.xyzx
    min r0.w, r3.z, r3.y
    min r0.w, r0.w, r3.x
    mad r2.xyw, r13.xyxz, r0.wwww, r2.xyxw
    add r2.xyw, r2.xyxw, -cb3[11].xyxz
    dp3 r3.x, r2.xywx, cb3[14].xyzx
    dp3 r3.y, r2.xywx, cb3[15].xyzx
    dp3 r0.w, r2.xywx, cb3[16].xyzx
    log r2.x, r0.y
    mad r2.x, -r2.x, l(1.800000), l(1.000000)
    add r2.x, -r2.x, l(8.000000)
    mov r3.z, -r0.w
    sample_l_indexable(texturecube)(float,float,float,float) r2.xyw, r3.xyzx, t7.xywz, s5, r2.x
    mul r11.xyz, r11.wwww, r2.xywx
    mad r12.xyzw, r0.zzzz, r11.xyzw, r12.xyzw
  endif
endif
eq r0.z, cb3[22].w, l(1.000000)
lt r0.w, r12.w, l(1.000000)
and r0.z, r0.w, r0.z
if_nz r0.z
  add r0.z, -r12.w, l(1.000000)
  add r2.xyw, r4.xyxz, -cb3[22].xyxz
  dp3 r3.x, r2.xywx, r2.xywx
  sqrt r3.y, r3.x
  mul_sat r3.y, r3.y, cb3[23].y
  dp3 r2.x, r10.xyzx, r2.xywx
  add r2.y, r2.x, r2.x
  add r2.w, r3.x, -cb3[23].x
  mul r2.w, r2.w, l(4.000000)
  mad r2.y, r2.y, r2.y, -r2.w
  ge r2.w, r2.y, l(0.000000)
  if_nz r2.w
    sqrt r2.y, r2.y
    mad r2.x, -r2.x, l(2.000000), r2.y
    mul r2.x, r2.x, l(0.500000)
    mad r2.xyw, r2.xxxx, r10.xyxz, r4.xyxz
    add r11.xyz, r2.xywx, -cb3[22].xyzx
    add r2.x, r3.y, l(-0.700000)
    mul r2.x, r2.x, l(3.33333325)
    max r2.x, r2.x, l(0.000000)
    mad r2.y, r2.x, l(-2.000000), l(3.000000)
    mul r2.x, r2.x, r2.x
    mad r13.w, -r2.y, r2.x, l(1.000000)
    log r2.x, r0.y
    mad r2.x, -r2.x, l(1.800000), l(1.000000)
    add r2.x, -r2.x, l(8.000000)
    mov r11.w, -r11.z
    sample_l_indexable(texturecube)(float,float,float,float) r2.xyw, r11.xywx, t8.xywz, s6, r2.x
    mul r13.xyz, r13.wwww, r2.xywx
  else
    mov r13.xyzw, l(0,0,0,0)
  endif
  mad r12.xyzw, r0.zzzz, r13.xyzw, r12.xyzw
else
  eq r0.z, cb3[22].w, l(2.000000)
  and r0.z, r0.w, r0.z
  if_nz r0.z
    add r0.z, -r12.w, l(1.000000)
    mov r4.w, l(1.000000)
    dp4 r3.x, r4.xyzw, cb3[29].xyzw
    dp4 r3.y, r4.xyzw, cb3[30].xyzw
    dp4 r3.z, r4.xyzw, cb3[31].xyzw
    add r2.xyw, r3.xyxz, r3.xyxz
    mad_sat r11.xyz, |r2.xywx|, cb3[23].xyzx, cb3[24].xyzx
    mul r0.w, r11.y, r11.x
    mul r11.w, r11.z, r0.w
    dp3 r13.x, r10.xyzx, cb3[29].xyzx
    dp3 r13.y, r10.xyzx, cb3[30].xyzx
    dp3 r13.z, r10.xyzx, cb3[31].xyzx
    mad r14.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
    div r14.xyz, r14.xyzx, r13.xyzx
    mad r3.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r3.xyz, r3.xyzx, r13.xyzx
    max r3.xyz, r3.xyzx, r14.xyzx
    min r0.w, r3.z, r3.y
    min r0.w, r0.w, r3.x
    mad r2.xyw, r13.xyxz, r0.wwww, r2.xyxw
    add r2.xyw, r2.xyxw, -cb3[22].xyxz
    dp3 r3.x, r2.xywx, cb3[25].xyzx
    dp3 r3.y, r2.xywx, cb3[26].xyzx
    dp3 r0.w, r2.xywx, cb3[27].xyzx
    log r2.x, r0.y
    mad r2.x, -r2.x, l(1.800000), l(1.000000)
    add r2.x, -r2.x, l(8.000000)
    mov r3.z, -r0.w
    sample_l_indexable(texturecube)(float,float,float,float) r2.xyw, r3.xyzx, t8.xywz, s6, r2.x
    mul r11.xyz, r11.wwww, r2.xywx
    mad r12.xyzw, r0.zzzz, r11.xyzw, r12.xyzw
  endif
endif
eq r0.z, cb3[33].w, l(1.000000)
lt r0.w, r12.w, l(1.000000)
and r0.z, r0.w, r0.z
if_nz r0.z
  add r0.z, -r12.w, l(1.000000)
  add r2.xyw, r4.xyxz, -cb3[33].xyxz
  dp3 r3.x, r2.xywx, r2.xywx
  sqrt r3.y, r3.x
  mul_sat r3.y, r3.y, cb3[34].y
  dp3 r2.x, r10.xyzx, r2.xywx
  add r2.y, r2.x, r2.x
  add r2.w, r3.x, -cb3[34].x
  mul r2.w, r2.w, l(4.000000)
  mad r2.y, r2.y, r2.y, -r2.w
  ge r2.w, r2.y, l(0.000000)
  if_nz r2.w
    sqrt r2.y, r2.y
    mad r2.x, -r2.x, l(2.000000), r2.y
    mul r2.x, r2.x, l(0.500000)
    mad r2.xyw, r2.xxxx, r10.xyxz, r4.xyxz
    add r11.xyz, r2.xywx, -cb3[33].xyzx
    add r2.x, r3.y, l(-0.700000)
    mul r2.x, r2.x, l(3.33333325)
    max r2.x, r2.x, l(0.000000)
    mad r2.y, r2.x, l(-2.000000), l(3.000000)
    mul r2.x, r2.x, r2.x
    mad r13.w, -r2.y, r2.x, l(1.000000)
    log r2.x, r0.y
    mad r2.x, -r2.x, l(1.800000), l(1.000000)
    add r2.x, -r2.x, l(8.000000)
    mov r11.w, -r11.z
    sample_l_indexable(texturecube)(float,float,float,float) r2.xyw, r11.xywx, t9.xywz, s7, r2.x
    mul r13.xyz, r13.wwww, r2.xywx
  else
    mov r13.xyzw, l(0,0,0,0)
  endif
  mad r12.xyzw, r0.zzzz, r13.xyzw, r12.xyzw
else
  eq r0.z, cb3[33].w, l(2.000000)
  and r0.z, r0.w, r0.z
  if_nz r0.z
    add r0.z, -r12.w, l(1.000000)
    mov r4.w, l(1.000000)
    dp4 r3.x, r4.xyzw, cb3[40].xyzw
    dp4 r3.y, r4.xyzw, cb3[41].xyzw
    dp4 r3.z, r4.xyzw, cb3[42].xyzw
    add r2.xyw, r3.xyxz, r3.xyxz
    mad_sat r11.xyz, |r2.xywx|, cb3[34].xyzx, cb3[35].xyzx
    mul r0.w, r11.y, r11.x
    mul r11.w, r11.z, r0.w
    dp3 r13.x, r10.xyzx, cb3[40].xyzx
    dp3 r13.y, r10.xyzx, cb3[41].xyzx
    dp3 r13.z, r10.xyzx, cb3[42].xyzx
    mad r14.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
    div r14.xyz, r14.xyzx, r13.xyzx
    mad r3.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r3.xyz, r3.xyzx, r13.xyzx
    max r3.xyz, r3.xyzx, r14.xyzx
    min r0.w, r3.z, r3.y
    min r0.w, r0.w, r3.x
    mad r2.xyw, r13.xyxz, r0.wwww, r2.xyxw
    add r2.xyw, r2.xyxw, -cb3[33].xyxz
    dp3 r3.x, r2.xywx, cb3[36].xyzx
    dp3 r3.y, r2.xywx, cb3[37].xyzx
    dp3 r0.w, r2.xywx, cb3[38].xyzx
    log r2.x, r0.y
    mad r2.x, -r2.x, l(1.800000), l(1.000000)
    add r2.x, -r2.x, l(8.000000)
    mov r3.z, -r0.w
    sample_l_indexable(texturecube)(float,float,float,float) r2.xyw, r3.xyzx, t9.xywz, s7, r2.x
    mul r11.xyz, r11.wwww, r2.xywx
    mad r12.xyzw, r0.zzzz, r11.xyzw, r12.xyzw
  endif
endif
eq r0.z, cb3[44].w, l(1.000000)
lt r0.w, r12.w, l(1.000000)
and r0.z, r0.w, r0.z
if_nz r0.z
  add r0.z, -r12.w, l(1.000000)
  add r2.xyw, r4.xyxz, -cb3[44].xyxz
  dp3 r3.x, r2.xywx, r2.xywx
  sqrt r3.y, r3.x
  mul_sat r3.y, r3.y, cb3[45].y
  dp3 r2.x, r10.xyzx, r2.xywx
  add r2.y, r2.x, r2.x
  add r2.w, r3.x, -cb3[45].x
  mul r2.w, r2.w, l(4.000000)
  mad r2.y, r2.y, r2.y, -r2.w
  ge r2.w, r2.y, l(0.000000)
  if_nz r2.w
    sqrt r2.y, r2.y
    mad r2.x, -r2.x, l(2.000000), r2.y
    mul r2.x, r2.x, l(0.500000)
    mad r2.xyw, r2.xxxx, r10.xyxz, r4.xyxz
    add r11.xyz, r2.xywx, -cb3[44].xyzx
    add r2.x, r3.y, l(-0.700000)
    mul r2.x, r2.x, l(3.33333325)
    max r2.x, r2.x, l(0.000000)
    mad r2.y, r2.x, l(-2.000000), l(3.000000)
    mul r2.x, r2.x, r2.x
    mad r2.x, -r2.y, r2.x, l(1.000000)
    log r2.y, r0.y
    mad r2.y, -r2.y, l(1.800000), l(1.000000)
    add r2.y, -r2.y, l(8.000000)
    mov r11.w, -r11.z
    sample_l_indexable(texturecube)(float,float,float,float) r3.xyz, r11.xywx, t10.xyzw, s8, r2.y
    mul r2.xyw, r2.xxxx, r3.xyxz
  else
    mov r2.xyw, l(0,0,0,0)
  endif
  mad r12.xyz, r0.zzzz, r2.xywx, r12.xyzx
else
  eq r0.z, cb3[44].w, l(2.000000)
  and r0.z, r0.w, r0.z
  if_nz r0.z
    add r0.z, -r12.w, l(1.000000)
    mov r4.w, l(1.000000)
    dp4 r3.x, r4.xyzw, cb3[51].xyzw
    dp4 r3.y, r4.xyzw, cb3[52].xyzw
    dp4 r3.z, r4.xyzw, cb3[53].xyzw
    add r2.xyw, r3.xyxz, r3.xyxz
    mad_sat r11.xyz, |r2.xywx|, cb3[45].xyzx, cb3[46].xyzx
    mul r0.w, r11.y, r11.x
    mul r0.w, r11.z, r0.w
    dp3 r11.x, r10.xyzx, cb3[51].xyzx
    dp3 r11.y, r10.xyzx, cb3[52].xyzx
    dp3 r11.z, r10.xyzx, cb3[53].xyzx
    mad r10.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
    div r10.xyz, r10.xyzx, r11.xyzx
    mad r3.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r3.xyz, r3.xyzx, r11.xyzx
    max r3.xyz, r3.xyzx, r10.xyzx
    min r3.y, r3.z, r3.y
    min r3.x, r3.y, r3.x
    mad r2.xyw, r11.xyxz, r3.xxxx, r2.xyxw
    add r2.xyw, r2.xyxw, -cb3[44].xyxz
    dp3 r3.x, r2.xywx, cb3[47].xyzx
    dp3 r3.y, r2.xywx, cb3[48].xyzx
    dp3 r2.x, r2.xywx, cb3[49].xyzx
    log r2.y, r0.y
    mad r2.y, -r2.y, l(1.800000), l(1.000000)
    add r2.y, -r2.y, l(8.000000)
    mov r3.z, -r2.x
    sample_l_indexable(texturecube)(float,float,float,float) r2.xyw, r3.xyzx, t10.xywz, s8, r2.y
    mul r2.xyw, r0.wwww, r2.xyxw
    mad r12.xyz, r0.zzzz, r2.xywx, r12.xyzx
  endif
endif
mov r4.w, l(1.000000)


//disab le SSR
//mov r4.z, l(1.0)



add r4.xyzw, r4.xyzw, -cb0[35].xyzw
dp4 r10.x, r4.xyzw, cb0[31].xyzw
dp4 r10.y, r4.xyzw, cb0[32].xyzw
dp4 r10.z, r4.xyzw, cb0[33].xyzw
mul r0.zw, v0.xxxy, cb0[18].zzzw
ftou r2.xy, v0.xyxx
lt r2.w, l(0.200000), r0.y
if_nz r2.w
  mov r3.xyz, l(0,0,0,0)
  mov r4.x, l(0)
endif
if_z r2.w
  dp3 r11.x, r7.xyzx, cb0[31].xyzx
  dp3 r11.y, r7.xyzx, cb0[32].xyzx
  dp3 r11.z, r7.xyzx, cb0[33].xyzx
  dp3 r2.w, r10.xyzx, r10.xyzx
  rsq r2.w, r2.w
  mul r4.yzw, r2.wwww, r10.xxyz
  dp3 r2.w, r4.yzwy, r11.xyzx
  add r2.w, r2.w, r2.w
  mad r13.xyz, r11.xyzx, -r2.wwww, r4.yzwy
  dp3 r5.w, r13.xyzx, r13.xyzx
  rsq r5.w, r5.w
  mad r6.w, -r0.y, r0.y, l(1.000000)
  sqrt r7.y, r6.w
  mad r7.y, r0.y, r0.y, r7.y
  mul r6.w, r6.w, r7.y
  mad r13.xyz, r13.xyzx, r5.wwww, -r11.xyzx
  mad r11.xyz, r6.wwww, r13.xyzx, r11.xyzx
  dp3 r5.w, r11.xyzx, r11.xyzx
  rsq r5.w, r5.w
  mul r11.xyz, r5.wwww, r11.xyzx
  dp3 r4.y, r11.xyzx, r4.yzwy
  mul_sat r4.y, r4.y, l(2.857143)
  mad r4.z, r4.y, l(-2.000000), l(3.000000)
  mul r4.y, r4.y, r4.y
  mul r4.y, r4.y, r4.z
  ge r4.z, l(0.000000), r4.y
  if_nz r4.z
    mov r3.xyz, l(0,0,0,0)
    mov r4.x, l(0)
  endif
  if_z r4.z
    eq r4.z, cb0[49].z, l(0.000000)
    ftou r4.w, cb0[1].w
    movc r13.z, r4.z, l(0), r4.w
    and r13.xy, r2.xyxx, l(63, 63, 0, 0)
    mov r13.w, l(0)
    ld_indexable(texture2darray)(float,float,float,float) r4.z, r13.xyzw, t11.yzxw
    mad r13.xyz, r11.xyzx, l(500000.000000, 500000.000000, 500000.000000, 0.000000), r10.xyzx
    
    mov r10.w, l(1.000000)
    dp4 r14.x, r10.xyzw, cb0[49].xyzw
    dp4 r14.y, r10.xyzw, cb0[50].xyzw
    dp4 r14.z, r10.xyzw, cb0[51].xyzw
    dp4 r4.w, r10.xyzw, cb0[52].xyzw
	
    mov r13.w, l(1.000000)
    dp4 r15.x, r13.xyzw, cb0[49].xyzw
    dp4 r15.y, r13.xyzw, cb0[50].xyzw
    dp4 r15.z, r13.xyzw, cb0[51].xyzw
    dp4 r5.w, r13.xyzw, cb0[52].xyzw


ld_indexable(texture2d)(float,float,float,float) r26.xyzw, l(0, 0, 0, 0), t125.xyzw
//proper SSR fix by losti
//add r26.w, r0.w, r26.y
//mul r26.w, r26.w, l(1.0)
mad r14.x, r4.w, r26.x, r14.x
//add r26.w, r5.x, r26.y
//mul r26.w, r26.w, l(1.0)
mad r15.x, r5.w, r26.x, r15.x


//    div r13.xyz, r14.xyzx, r4.wwww
  //  div r14.xyz, r15.xyzx, r5.wwww






    lt r7.yw, l(0.000000, 1.000000, 0.000000, 1.000000), r14.yyyx
    lt r15.xy, r14.yxyy, l(-1.000000, -1.000000, 0.000000, 0.000000)
    or r15.xy, r7.ywyy, r15.xyxx
    movc r7.yw, r7.yyyw, l(0,-1.000000,0,-1.000000), l(0,1.000000,0,1.000000)
    add r7.yw, r7.yyyw, r14.yyyx
    add r15.zw, -r13.yyyx, r14.yyyx
    div r7.yw, r7.yyyw, r15.zzzw
    and r4.w, r7.y, r15.x
    max r5.w, r7.w, r4.w
    movc r4.w, r15.y, r5.w, r4.w
    add r15.xyz, r13.xyzx, -r14.xyzx
    mad r14.xyz, r4.wwww, r15.xyzx, r14.xyzx
    add r14.xyz, -r13.xyzx, r14.xyzx
    mul r4.w, |r14.z|, l(0.0833333358)
    mul r5.w, r4.z, l(0.0833333358)
    mad r6.w, r4.z, l(0.0833333358), l(0.0833333358)
    mul r14.xyw, r14.xyxz, l(0.500000, -0.500000, 0.000000, 1.000000)
    mad r13.xyz, r13.xyzx, l(0.500000, -0.500000, 1.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
    mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
    sample_l_indexable(texture2d)(float,float,float,float) r7.y, r15.xyxx, t3.yxzw, s1, l(0.000000)
    add r7.y, -r15.z, r7.y
    mad r7.w, -|r14.z|, l(0.0833333358), r7.y
    ge r7.w, r4.w, |r7.w|
    if_nz r7.w
      min r5.w, r5.w, l(1.000000)
    else
      mov r5.w, l(1.000000)
    endif
    movc r7.y, r7.w, l(0), r7.y
    if_z r7.w
      mad r6.w, r4.z, l(0.0833333358), l(0.166666672)
      if_z r7.w
        mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
        mul r7.w, r0.y, l(0.333333343)
        sample_l_indexable(texture2d)(float,float,float,float) r7.w, r15.xyxx, t3.yzwx, s1, r7.w
        add r7.w, -r15.z, r7.w
        mad r8.w, -|r14.z|, l(0.0833333358), r7.w
        ge r8.w, r4.w, |r8.w|
        if_nz r8.w
          add r9.w, -r7.w, r7.y
          div_sat r9.w, r7.y, r9.w
          mad r9.w, r9.w, l(0.0833333358), r6.w
          add r9.w, r9.w, l(-0.0833333358)
          min r5.w, r5.w, r9.w
        endif
        movc r7.y, r8.w, r7.y, r7.w
      else
        mov r8.w, l(-1)
      endif
    else
      mov r8.w, l(-1)
    endif
    if_z r8.w
      add r6.w, r6.w, l(0.0833333358)
      mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
      mul r7.w, r0.y, l(0.666666687)
      sample_l_indexable(texture2d)(float,float,float,float) r7.w, r15.xyxx, t3.yzwx, s1, r7.w
      add r7.w, -r15.z, r7.w
      mad r8.w, -|r14.z|, l(0.0833333358), r7.w
      ge r8.w, r4.w, |r8.w|
      if_nz r8.w
        add r9.w, -r7.w, r7.y
        div_sat r9.w, r7.y, r9.w
        mad r9.w, r9.w, l(0.0833333358), r6.w
        add r9.w, r9.w, l(-0.0833333358)
        min r5.w, r5.w, r9.w
      endif
      movc r7.y, r8.w, r7.y, r7.w
    else
      mov r8.w, l(-1)
    endif
    if_z r8.w
      add r6.w, r6.w, l(0.0833333358)
      mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
      sample_l_indexable(texture2d)(float,float,float,float) r7.w, r15.xyxx, t3.yzwx, s1, r0.y
      add r7.w, -r15.z, r7.w
      mad r8.w, -|r14.z|, l(0.0833333358), r7.w
      ge r8.w, r4.w, |r8.w|
      if_nz r8.w
        add r9.w, -r7.w, r7.y
        div_sat r9.w, r7.y, r9.w
        mad r9.w, r9.w, l(0.0833333358), r6.w
        add r9.w, r9.w, l(-0.0833333358)
        min r5.w, r5.w, r9.w
      endif
      movc r7.y, r8.w, r7.y, r7.w
    else
      mov r8.w, l(-1)
    endif
    if_z r8.w
      add r6.w, r6.w, l(0.0833333358)
      mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
      mul r7.w, r0.y, l(1.33333337)
      sample_l_indexable(texture2d)(float,float,float,float) r7.w, r15.xyxx, t3.yzwx, s1, r7.w
      add r7.w, -r15.z, r7.w
      mad r8.w, -|r14.z|, l(0.0833333358), r7.w
      ge r8.w, r4.w, |r8.w|
      if_nz r8.w
        add r9.w, -r7.w, r7.y
        div_sat r9.w, r7.y, r9.w
        mad r9.w, r9.w, l(0.0833333358), r6.w
        add r9.w, r9.w, l(-0.0833333358)
        min r5.w, r5.w, r9.w
      endif
      movc r7.y, r8.w, r7.y, r7.w
    else
      mov r8.w, l(-1)
    endif
    if_z r8.w
      add r6.w, r6.w, l(0.0833333358)
      mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
      mul r7.w, r0.y, l(1.66666663)
      sample_l_indexable(texture2d)(float,float,float,float) r7.w, r15.xyxx, t3.yzwx, s1, r7.w
      add r7.w, -r15.z, r7.w
      mad r8.w, -|r14.z|, l(0.0833333358), r7.w
      ge r8.w, r4.w, |r8.w|
      if_nz r8.w
        add r9.w, -r7.w, r7.y
        div_sat r9.w, r7.y, r9.w
        mad r9.w, r9.w, l(0.0833333358), r6.w
        add r9.w, r9.w, l(-0.0833333358)
        min r5.w, r5.w, r9.w
      endif
      movc r7.y, r8.w, r7.y, r7.w
    else
      mov r8.w, l(-1)
    endif
    if_z r8.w
      add r6.w, r6.w, l(0.0833333358)
      mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
      sample_l_indexable(texture2d)(float,float,float,float) r3.w, r15.xyxx, t3.yzwx, s1, r3.w
      add r3.w, -r15.z, r3.w
      mad r7.w, -|r14.z|, l(0.0833333358), r3.w
      ge r7.w, r4.w, |r7.w|
      if_nz r7.w
        add r8.w, -r3.w, r7.y
        div_sat r8.w, r7.y, r8.w
        mad r8.w, r8.w, l(0.0833333358), r6.w
        add r8.w, r8.w, l(-0.0833333358)
        min r5.w, r5.w, r8.w
      endif
      movc r7.y, r7.w, r7.y, r3.w
    else
      mov r7.w, l(-1)
    endif
    if_z r7.w
      add r6.w, r6.w, l(0.0833333358)
      mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
      mul r3.w, r0.y, l(2.33333325)
      sample_l_indexable(texture2d)(float,float,float,float) r3.w, r15.xyxx, t3.yzwx, s1, r3.w
      add r3.w, -r15.z, r3.w
      mad r7.w, -|r14.z|, l(0.0833333358), r3.w
      ge r7.w, r4.w, |r7.w|
      if_nz r7.w
        add r8.w, -r3.w, r7.y
        div_sat r8.w, r7.y, r8.w
        mad r8.w, r8.w, l(0.0833333358), r6.w
        add r8.w, r8.w, l(-0.0833333358)
        min r5.w, r5.w, r8.w
      endif
      movc r7.y, r7.w, r7.y, r3.w
    else
      mov r7.w, l(-1)
    endif
    if_z r7.w
      add r6.w, r6.w, l(0.0833333358)
      mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
      mul r3.w, r0.y, l(2.66666675)
      sample_l_indexable(texture2d)(float,float,float,float) r3.w, r15.xyxx, t3.yzwx, s1, r3.w
      add r3.w, -r15.z, r3.w
      mad r7.w, -|r14.z|, l(0.0833333358), r3.w
      ge r7.w, r4.w, |r7.w|
      if_nz r7.w
        add r8.w, -r3.w, r7.y
        div_sat r8.w, r7.y, r8.w
        mad r8.w, r8.w, l(0.0833333358), r6.w
        add r8.w, r8.w, l(-0.0833333358)
        min r5.w, r5.w, r8.w
      endif
      movc r7.y, r7.w, r7.y, r3.w
    else
      mov r7.w, l(-1)
    endif
    if_z r7.w
      add r6.w, r6.w, l(0.0833333358)
      mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
      mul r3.w, r0.y, l(3.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r3.w, r15.xyxx, t3.yzwx, s1, r3.w
      add r3.w, -r15.z, r3.w
      mad r7.w, -|r14.z|, l(0.0833333358), r3.w
      ge r7.w, r4.w, |r7.w|
      if_nz r7.w
        add r8.w, -r3.w, r7.y
        div_sat r8.w, r7.y, r8.w
        mad r8.w, r8.w, l(0.0833333358), r6.w
        add r8.w, r8.w, l(-0.0833333358)
        min r5.w, r5.w, r8.w
      endif
      movc r7.y, r7.w, r7.y, r3.w
    else
      mov r7.w, l(-1)
    endif
    if_z r7.w
      add r6.w, r6.w, l(0.0833333358)
      mad r15.xyz, r14.xywx, r6.wwww, r13.xyzx
      mul r3.w, r0.y, l(3.33333325)
      sample_l_indexable(texture2d)(float,float,float,float) r3.w, r15.xyxx, t3.yzwx, s1, r3.w
      add r3.w, -r15.z, r3.w
      mad r7.w, -|r14.z|, l(0.0833333358), r3.w
      ge r7.w, r4.w, |r7.w|
      if_nz r7.w
        add r8.w, -r3.w, r7.y
        div_sat r8.w, r7.y, r8.w
        mad r8.w, r8.w, l(0.0833333358), r6.w
        add r8.w, r8.w, l(-0.0833333358)
        min r5.w, r5.w, r8.w
      endif
      movc r7.y, r7.w, r7.y, r3.w
    else
      mov r7.w, l(-1)
    endif
    if_z r7.w
      add r3.w, r6.w, l(0.0833333358)
      mad r15.xyz, r14.xywx, r3.wwww, r13.xyzx
      mul r6.w, r0.y, l(3.66666675)
      sample_l_indexable(texture2d)(float,float,float,float) r6.w, r15.xyxx, t3.yzwx, s1, r6.w
      add r6.w, -r15.z, r6.w
      mad r7.w, -|r14.z|, l(0.0833333358), r6.w
      ge r4.w, r4.w, |r7.w|
      if_nz r4.w
        add r4.w, -r6.w, r7.y
        div_sat r4.w, r7.y, r4.w
        mad r3.w, r4.w, l(0.0833333358), r3.w
        add r3.w, r3.w, l(-0.0833333358)
        min r5.w, r3.w, r5.w
      endif
    endif
    mad r13.xyz, r14.xywx, r5.wwww, r13.xyzx
    lt r3.w, r5.w, l(1.000000)
    add r7.yw, r13.xxxy, l(0.000000, -0.500000, 0.000000, -0.500000)
    ge r7.yw, l(0.000000, 0.500000, 0.000000, 0.500000), |r7.yyyw|
    and r4.w, r7.w, r7.y
    and r3.w, r3.w, r4.w
    if_nz r3.w
      mul r14.xyzw, r13.xyyy, cb0[18].xyyy
      ftoi r14.xyzw, r14.xyzw
      ld_uav_typed_indexable(texture2d)(uint,uint,uint,uint) r3.w, r14.xwww, u1.yzwx
      ld_uav_typed_indexable(texture2d)(float,float,float,float) r4.w, r14.xyzw, u2.yzwx
      and r5.w, r3.w, l(0x0000ffff)
      f16tof32 r14.x, r5.w
      ushr r3.w, r3.w, l(16)
      f16tof32 r14.y, r3.w
      add r7.yw, r13.xxxy, -r14.xxxy
      sample_l_indexable(texture2d)(float,float,float,float) r3.w, r7.ywyy, t5.yzwx, s3, l(0.000000)
      add r3.w, -|r4.w|, r3.w
      ge r3.w, l(0.010000), r3.w
      mov_sat r14.xy, r7.ywyy
      add r14.xy, r7.ywyy, -r14.xyxx
      dp2 r4.w, r14.xyxx, r14.xyxx
      eq r4.w, r4.w, l(0.000000)
      and r3.w, r3.w, r4.w
      if_nz r3.w
        mad r3.w, -cb5[23].y, r2.z, l(1.000000)
        mad r3.w, r3.w, l(10.000000), l(1.000000)
        exp r3.w, r3.w
        add r3.w, r3.w, l(1.000000)
        div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
        mul r3.w, r3.w, l(-2.03504682)
        exp r3.w, r3.w
        add r4.w, -r3.w, l(1.000000)
        sqrt r4.w, r4.w
        mad r5.w, r3.w, l(-0.0187292993), l(0.074261)
        mad r5.w, r5.w, r3.w, l(-0.212114394)
        mad r3.w, r5.w, r3.w, l(1.57072878)
        mul r3.w, r4.w, r3.w
        mul r3.w, r3.w, l(0.500000)
        sincos r14.x, r15.x, r3.w
        div r3.w, r14.x, r15.x
        mov_sat r2.w, r2.w
        sqrt r4.w, r0.y
        add r5.w, -r2.w, l(1.000000)
        mad r2.w, r4.w, r5.w, r2.w
        mul r2.w, r2.w, r3.w
        mad r14.xy, -v0.xyxx, cb0[18].zwzz, r13.xyxx
        dp2 r3.w, r14.xyxx, r14.xyxx
        sqrt r3.w, r3.w
        mul r2.w, r2.w, r3.w
        max r3.w, cb0[18].y, cb0[18].x
        dp2 r2.w, r3.wwww, r2.wwww
        log r2.w, r2.w
        max r2.w, r2.w, l(0.000000)
        min r2.w, r2.w, l(7.000000)
        lt r0.y, l(0.000000), r0.y
        and r0.y, r0.y, l(0x3f800000)
        mul r0.y, r0.y, r2.w
        mul r2.w, r4.z, l(0.200000)
        sample_l_indexable(texture2d)(float,float,float,float) r14.xyz, r7.ywyy, t4.xyzw, s2, r0.y
        mad r15.xyz, r13.xyzx, l(2.000000, -2.000000, 1.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
        mov r15.w, l(1.000000)
        dp4 r16.x, r15.xyzw, cb0[65].xyzw
        dp4 r16.y, r15.xyzw, cb0[66].xyzw
        dp4 r16.z, r15.xyzw, cb0[67].xyzw
        dp4 r0.y, r15.xyzw, cb0[68].xyzw
        div r15.xyz, r16.xyzx, r0.yyyy
        dp3 r0.y, r15.xyzx, r15.xyzx
        sqrt r0.y, r0.y
        mul r16.xyz, r15.yyyy, cb0[37].zxyz
        mad r16.xyz, r15.xxxx, cb0[36].zxyz, r16.xyzx
        mad r16.xyz, r15.zzzz, cb0[38].zxyz, r16.xyzx
        dp3 r3.w, r16.xyzx, r16.xyzx
        rsq r3.w, r3.w
        mul r16.xyz, r3.wwww, r16.xyzx
        sample_l_indexable(texture2d)(float,float,float,float) r3.w, r13.xyxx, t14.yzwx, s10, l(0.000000)
        add r4.z, r0.y, -cb1[19].y
        div_sat r4.z, r4.z, cb1[19].z
        mad r4.z, -r4.z, r3.w, l(1.000000)
        mul r4.w, r4.z, cb1[19].w
        min r5.w, |r16.y|, |r16.x|
        max r6.w, |r16.y|, |r16.x|
        div r6.w, l(1.000000, 1.000000, 1.000000, 1.000000), r6.w
        mul r5.w, r5.w, r6.w
        mul r6.w, r5.w, r5.w
        mad r8.w, r6.w, l(0.0208350997), l(-0.085133)
        mad r8.w, r6.w, r8.w, l(0.180141)
        mad r8.w, r6.w, r8.w, l(-0.330299497)
        mad r6.w, r6.w, r8.w, l(0.999866)
        mul r8.w, r5.w, r6.w
        lt r9.w, |r16.y|, |r16.x|
        mad r8.w, r8.w, l(-2.000000), l(1.57079637)
        and r8.w, r9.w, r8.w
        mad r5.w, r5.w, r6.w, r8.w
        lt r13.xy, r16.yzyy, -r16.yzyy
        and r6.w, r13.x, l(0xc0490fdb)
        add r5.w, r5.w, r6.w
        min r6.w, r16.y, r16.x
        max r8.w, r16.y, r16.x
        lt r6.w, r6.w, -r6.w
        ge r8.w, r8.w, -r8.w
        and r6.w, r6.w, r8.w
        movc r5.w, r6.w, -r5.w, r5.w
        mad r16.x, r5.w, l(0.159154937), l(0.500000)
        add r5.w, -|r16.z|, l(1.000000)
        sqrt r5.w, r5.w
        mad r6.w, |r16.z|, l(-0.0187292993), l(0.074261)
        mad r6.w, r6.w, |r16.z|, l(-0.212114394)
        mad r6.w, r6.w, |r16.z|, l(1.57072878)
        mul r8.w, r5.w, r6.w
        mad r8.w, r8.w, l(-2.000000), l(3.14159274)
        and r8.w, r13.y, r8.w
        mad r5.w, r6.w, r5.w, r8.w
        mul r16.y, r5.w, l(0.318309873)
        sample_l_indexable(texture2d)(float,float,float,float) r13.xyzw, r16.xyxx, t15.xyzw, s11, r4.w
        lt r5.w, l(0.000000), cb1[22].w
        if_nz r5.w
          sample_l_indexable(texture2d)(float,float,float,float) r16.xyzw, r16.xyxx, t16.xyzw, s11, r4.w
          add r16.xyzw, -r13.xyzw, r16.xyzw
          mad r13.xyzw, cb1[22].wwww, r16.xyzw, r13.xyzw
        endif
        mad r16.xyz, r13.xyzx, cb1[20].wwww, cb1[20].xyzx
        add r16.xyz, -r13.xyzx, r16.xyzx
        mad r13.xyz, r4.zzzz, r16.xyzx, r13.xyzx
        add r16.xyz, -cb1[21].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mad r16.xyz, r3.wwww, r16.xyzx, cb1[21].xyzx
        mul r13.xyz, r13.xyzx, r16.xyzx
        mul r13.xyz, r13.xyzx, cb1[21].wwww
        mul r0.y, -r0.y, cb1[19].x
        mul r0.y, r0.y, l(1.442695)
        exp r0.y, r0.y
        add r0.y, -r0.y, l(1.000000)
        mul r4.z, r0.y, r13.w
        mad r13.xyz, r13.xyzx, r4.zzzz, -r14.xyzx
        mad r0.y, r13.w, r0.y, l(-1.000000)
        div r13.xyz, r13.xyzx, r0.yyyy
        add r14.xyz, -r10.xyzx, r15.xyzx
        dp3 r0.y, r14.xyzx, r14.xyzx
        sqrt r0.y, r0.y
        mul r14.xyz, r11.yyyy, cb0[32].zxyz
        mad r11.xyw, r11.xxxx, cb0[31].zxzy, r14.xyxz
        mad r11.xyz, r11.zzzz, cb0[33].zxyz, r11.xywx
        add r4.z, r0.y, -cb1[19].y
        div_sat r4.z, r4.z, cb1[19].z
        mad r3.w, -r4.z, r3.w, l(1.000000)
        mul r4.z, r3.w, cb1[19].w
        min r4.w, |r11.y|, |r11.x|
        max r6.w, |r11.y|, |r11.x|
        div r6.w, l(1.000000, 1.000000, 1.000000, 1.000000), r6.w
        mul r4.w, r4.w, r6.w
        mul r6.w, r4.w, r4.w
        mad r8.w, r6.w, l(0.0208350997), l(-0.085133)
        mad r8.w, r6.w, r8.w, l(0.180141)
        mad r8.w, r6.w, r8.w, l(-0.330299497)
        mad r6.w, r6.w, r8.w, l(0.999866)
        mul r8.w, r4.w, r6.w
        lt r9.w, |r11.y|, |r11.x|
        mad r8.w, r8.w, l(-2.000000), l(1.57079637)
        and r8.w, r9.w, r8.w
        mad r4.w, r4.w, r6.w, r8.w
        lt r14.xy, r11.yzyy, -r11.yzyy
        and r6.w, r14.x, l(0xc0490fdb)
        add r4.w, r4.w, r6.w
        min r6.w, r11.y, r11.x
        max r8.w, r11.y, r11.x
        lt r6.w, r6.w, -r6.w
        ge r8.w, r8.w, -r8.w
        and r6.w, r6.w, r8.w
        movc r4.w, r6.w, -r4.w, r4.w
        mad r11.x, r4.w, l(0.159154937), l(0.500000)
        add r4.w, -|r11.z|, l(1.000000)
        sqrt r4.w, r4.w
        mad r6.w, |r11.z|, l(-0.0187292993), l(0.074261)
        mad r6.w, r6.w, |r11.z|, l(-0.212114394)
        mad r6.w, r6.w, |r11.z|, l(1.57072878)
        mul r8.w, r4.w, r6.w
        mad r8.w, r8.w, l(-2.000000), l(3.14159274)
        and r8.w, r14.y, r8.w
        mad r4.w, r6.w, r4.w, r8.w
        mul r11.y, r4.w, l(0.318309873)
        sample_l_indexable(texture2d)(float,float,float,float) r14.xyzw, r11.xyxx, t15.xyzw, s11, r4.z
        if_nz r5.w
          sample_l_indexable(texture2d)(float,float,float,float) r11.xyzw, r11.xyxx, t16.xyzw, s11, r4.z
          add r11.xyzw, -r14.xyzw, r11.xyzw
          mad r14.xyzw, cb1[22].wwww, r11.xyzw, r14.xyzw
        endif
        mad r11.xyz, r14.xyzx, cb1[20].wwww, cb1[20].xyzx
        add r11.xyz, -r14.xyzx, r11.xyzx
        mad r11.xyz, r3.wwww, r11.xyzx, r14.xyzx
        mul r11.xyz, r16.xyzx, r11.xyzx
        mul r0.y, -r0.y, cb1[19].x
        mul r0.y, r0.y, l(1.442695)
        exp r0.y, r0.y
        add r0.y, -r0.y, l(1.000000)
        mul r0.y, r0.y, r14.w
        mad r11.xyz, r11.xyzx, cb1[21].wwww, -r13.xyzx
        mad r11.xyz, r0.yyyy, r11.xyzx, r13.xyzx
        mad r4.zw, r7.yyyw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
        add r4.zw, -|r4.zzzw|, l(0.000000, 0.000000, 1.000000, 1.000000)
        min r0.y, r4.w, r4.z
        div_sat r0.y, r0.y, r2.w
        min r3.xyz, -r11.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
        mov r3.xyz, -r3.xyzx
      else
        mov r3.xyz, l(0,0,0,0)
        mov r0.y, l(0)
      endif
    else
      mov r3.xyz, l(0,0,0,0)
      mov r0.y, l(0)
    endif
    mul r0.y, r4.y, r0.y
    mad r2.z, cb5[23].y, r2.z, l(-0.200000)
    mul_sat r2.z, r2.z, l(-10.000000)
    mul r4.x, r0.y, r2.z
  endif
endif
eq r0.y, cb0[49].z, l(0.000000)
ftou r11.z, cb0[1].w
movc r13.z, r0.y, l(0), r11.z
and r13.xy, r2.xyxx, l(63, 63, 0, 0)
mov r13.w, l(0)
ld_indexable(texture2darray)(float,float,float,float) r0.y, r13.xyzw, t11.yxzw
lt r2.x, r4.x, l(1.000000)
mul r0.y, r0.y, l(0.500000)
and r0.y, r0.y, r2.x
add_sat r0.y, -r0.y, r4.x
and r2.x, cb0[19].z, l(1)
add r2.yzw, -r12.xxyz, r3.xxyz
mad r2.yzw, r0.yyyy, r2.yyzw, r12.xxyz
movc r2.xyz, r2.xxxx, r2.yzwy, r12.xyzx
mul r2.xyz, r8.xyzx, r2.xyzx
mad r2.xyz, r6.xyzx, r1.zzzz, r2.xyzx
mad r3.xy, v0.xyxx, cb0[20].xyxx, cb0[20].zwzz
dp3 r0.y, r10.xyzx, r10.xyzx
sqrt r0.y, r0.y
sample_l_indexable(texture2d)(float,float,float,float) r1.z, r3.xyxx, t14.yzxw, s10, l(0.000000)
add r2.w, r0.y, -cb1[19].y
div_sat r2.w, r2.w, cb1[19].z
mad r2.w, -r2.w, r1.z, l(1.000000)
mul r3.z, r2.w, cb1[19].w
min r3.w, |r5.y|, |r5.x|
max r4.x, |r5.y|, |r5.x|
div r4.x, l(1.000000, 1.000000, 1.000000, 1.000000), r4.x
mul r3.w, r3.w, r4.x
mul r4.x, r3.w, r3.w
mad r4.y, r4.x, l(0.0208350997), l(-0.085133)
mad r4.y, r4.x, r4.y, l(0.180141)
mad r4.y, r4.x, r4.y, l(-0.330299497)
mad r4.x, r4.x, r4.y, l(0.999866)
mul r4.y, r3.w, r4.x
lt r4.z, |r5.y|, |r5.x|
mad r4.y, r4.y, l(-2.000000), l(1.57079637)
and r4.y, r4.z, r4.y
mad r3.w, r3.w, r4.x, r4.y
lt r4.xy, -r5.yzyy, r5.yzyy
and r4.x, r4.x, l(0xc0490fdb)
add r3.w, r3.w, r4.x
min r4.x, -r5.y, -r5.x
max r4.z, -r5.y, -r5.x
lt r4.x, r4.x, -r4.x
ge r4.z, r4.z, -r4.z
and r4.x, r4.z, r4.x
movc r3.w, r4.x, -r3.w, r3.w
mad r5.x, r3.w, l(0.159154937), l(0.500000)
add r3.w, -|r5.z|, l(1.000000)
sqrt r3.w, r3.w
mad r4.x, |r5.z|, l(-0.0187292993), l(0.074261)
mad r4.x, r4.x, |r5.z|, l(-0.212114394)
mad r4.x, r4.x, |r5.z|, l(1.57072878)
mul r4.z, r3.w, r4.x
mad r4.z, r4.z, l(-2.000000), l(3.14159274)
and r4.y, r4.y, r4.z
mad r3.w, r4.x, r3.w, r4.y
mul r5.y, r3.w, l(0.318309873)
sample_l_indexable(texture2d)(float,float,float,float) r4.xyzw, r5.xyxx, t15.xyzw, s11, r3.z
lt r3.w, l(0.000000), cb1[22].w
if_nz r3.w
  sample_l_indexable(texture2d)(float,float,float,float) r5.xyzw, r5.xyxx, t16.xyzw, s11, r3.z
  add r5.xyzw, -r4.xyzw, r5.xyzw
  mad r4.xyzw, cb1[22].wwww, r5.xyzw, r4.xyzw
endif
mad r5.xyz, r4.xyzx, cb1[20].wwww, cb1[20].xyzx
add r5.xyz, -r4.xyzx, r5.xyzx
mad r4.xyz, r2.wwww, r5.xyzx, r4.xyzx
add r5.xyz, -cb1[21].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r5.xyz, r1.zzzz, r5.xyzx, cb1[21].xyzx
mul r4.xyz, r4.xyzx, r5.xyzx
mul r4.xyz, r4.xyzx, cb1[21].wwww
mul r0.y, -r0.y, cb1[19].x
mul r0.y, r0.y, l(1.442695)
exp r0.y, r0.y
add r0.y, -r0.y, l(1.000000)
mul r0.y, r0.y, r4.w
mad r4.xyz, r4.xyzx, cb5[20].wwww, -r2.xyzx
mad r2.xyz, r0.yyyy, r4.xyzx, r2.xyzx
div r4.x, v3.z, v3.w
sample_l_indexable(texture2d)(float,float,float,float) r0.y, r3.xyxx, t3.yxzw, s1, l(1.000000)
add r0.y, r0.y, -cb0[51].z
div r0.y, cb0[51].w, r0.y
mov r4.y, l(1.000000)
dp2 r1.z, r4.xyxx, cb0[55].zwzz
dp2 r2.w, r4.xyxx, cb0[56].zwzz
div r1.z, r1.z, r2.w
add r0.y, r0.y, -r1.z
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r0.zwzz, t13.xyzw, s9
ne r0.z, cb5[26].w, l(0.000000)
if_nz r0.z
  mul r0.z, cb5[26].w, l(0.050000)
  mov r11.xyw, r13.xyxw
  ld_indexable(texture2darray)(float,float,float,float) r4.xy, r11.xyzw, t12.xyzw
  add r4.xy, r4.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
  mad r0.zw, r0.zzzz, r4.xxxy, r7.xxxz
  mul r2.w, r0.y, cb5[26].z
  mul r2.w, r2.w, l(0.200000)
  mul r0.zw, r0.zzzw, r2.wwww
  div r0.zw, r0.zzzw, r1.zzzz
  mad r0.zw, v0.xxxy, cb0[18].zzzw, r0.zzzw
  div r4.xy, r0.zwzz, cb0[18].zwzz
  mad r4.xy, r4.xyxx, cb0[20].xyxx, cb0[20].zwzz
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r4.xyxx, t3.yzwx, s1, l(1.000000)
  add r2.w, r2.w, -cb0[51].z
  div r2.w, cb0[51].w, r2.w
  add r2.w, -r1.z, r2.w
  lt r3.w, l(0.000000), r2.w
  if_nz r3.w
    sample_indexable(texture2d)(float,float,float,float) r4.xyz, r0.zwzz, t13.xyzw, s9
    mov r4.w, r2.w
  else
    mov r4.xyz, r3.xyzx
    mov r4.w, r0.y
  endif
  mul r4.w, -r4.w, cb5[25].z
  mul r4.w, r0.x, r4.w
  mul r4.w, r4.w, l(0.144269511)
  exp r4.w, r4.w
  add r4.w, -r4.w, l(1.000000)
  max r4.w, r4.w, l(0.000000)
  add r5.xyz, r1.xywx, -r4.xyzx
  mad r4.xyz, r4.wwww, r5.xyzx, r4.xyzx
  if_nz r3.w
    sample_indexable(texture2d)(float,float,float,float) r5.xyz, r0.zwzz, t13.xyzw, s9
    mov r4.w, r2.w
  else
    mov r5.xyz, r3.xyzx
    mov r4.w, r0.y
  endif
  mul r4.w, -r4.w, cb5[25].z
  mul r4.w, r0.x, r4.w
  mul r4.w, r4.w, l(0.144269511)
  exp r4.w, r4.w
  add r4.w, -r4.w, l(1.000000)
  max r4.w, r4.w, l(0.000000)
  add r6.xyz, r1.xywx, -r5.xyzx
  mad r5.xyz, r4.wwww, r6.xyzx, r5.xyzx
  mul r5.xyz, r5.xyzx, l(0.125000, 0.125000, 0.125000, 0.000000)
  mad r4.xyz, r4.xyzx, l(0.125000, 0.125000, 0.125000, 0.000000), r5.xyzx
  if_nz r3.w
    sample_indexable(texture2d)(float,float,float,float) r5.xyz, r0.zwzz, t13.xyzw, s9
    mov r4.w, r2.w
  else
    mov r5.xyz, r3.xyzx
    mov r4.w, r0.y
  endif
  mul r4.w, -r4.w, cb5[25].z
  mul r4.w, r0.x, r4.w
  mul r4.w, r4.w, l(0.144269511)
  exp r4.w, r4.w
  add r4.w, -r4.w, l(1.000000)
  max r4.w, r4.w, l(0.000000)
  add r6.xyz, r1.xywx, -r5.xyzx
  mad r5.xyz, r4.wwww, r6.xyzx, r5.xyzx
  mad r4.xyz, r5.xyzx, l(0.125000, 0.125000, 0.125000, 0.000000), r4.xyzx
  if_nz r3.w
    sample_indexable(texture2d)(float,float,float,float) r5.xyz, r0.zwzz, t13.xyzw, s9
    mov r4.w, r2.w
  else
    mov r5.xyz, r3.xyzx
    mov r4.w, r0.y
  endif
  mul r4.w, -r4.w, cb5[25].z
  mul r4.w, r0.x, r4.w
  mul r4.w, r4.w, l(0.144269511)
  exp r4.w, r4.w
  add r4.w, -r4.w, l(1.000000)
  max r4.w, r4.w, l(0.000000)
  add r6.xyz, r1.xywx, -r5.xyzx
  mad r5.xyz, r4.wwww, r6.xyzx, r5.xyzx
  mad r4.xyz, r5.xyzx, l(0.125000, 0.125000, 0.125000, 0.000000), r4.xyzx
  if_nz r3.w
    sample_indexable(texture2d)(float,float,float,float) r5.xyz, r0.zwzz, t13.xyzw, s9
    mov r4.w, r2.w
  else
    mov r5.xyz, r3.xyzx
    mov r4.w, r0.y
  endif
  mul r4.w, -r4.w, cb5[25].z
  mul r4.w, r0.x, r4.w
  mul r4.w, r4.w, l(0.144269511)
  exp r4.w, r4.w
  add r4.w, -r4.w, l(1.000000)
  max r4.w, r4.w, l(0.000000)
  add r6.xyz, r1.xywx, -r5.xyzx
  mad r5.xyz, r4.wwww, r6.xyzx, r5.xyzx
  mad r4.xyz, r5.xyzx, l(0.125000, 0.125000, 0.125000, 0.000000), r4.xyzx
  if_nz r3.w
    sample_indexable(texture2d)(float,float,float,float) r5.xyz, r0.zwzz, t13.xyzw, s9
    mov r4.w, r2.w
  else
    mov r5.xyz, r3.xyzx
    mov r4.w, r0.y
  endif
  mul r4.w, -r4.w, cb5[25].z
  mul r4.w, r0.x, r4.w
  mul r4.w, r4.w, l(0.144269511)
  exp r4.w, r4.w
  add r4.w, -r4.w, l(1.000000)
  max r4.w, r4.w, l(0.000000)
  add r6.xyz, r1.xywx, -r5.xyzx
  mad r5.xyz, r4.wwww, r6.xyzx, r5.xyzx
  mad r4.xyz, r5.xyzx, l(0.125000, 0.125000, 0.125000, 0.000000), r4.xyzx
  if_nz r3.w
    sample_indexable(texture2d)(float,float,float,float) r5.xyz, r0.zwzz, t13.xyzw, s9
    mov r4.w, r2.w
  else
    mov r5.xyz, r3.xyzx
    mov r4.w, r0.y
  endif
  mul r4.w, -r4.w, cb5[25].z
  mul r4.w, r0.x, r4.w
  mul r4.w, r4.w, l(0.144269511)
  exp r4.w, r4.w
  add r4.w, -r4.w, l(1.000000)
  max r4.w, r4.w, l(0.000000)
  add r6.xyz, r1.xywx, -r5.xyzx
  mad r5.xyz, r4.wwww, r6.xyzx, r5.xyzx
  mad r4.xyz, r5.xyzx, l(0.125000, 0.125000, 0.125000, 0.000000), r4.xyzx
  if_nz r3.w
    sample_indexable(texture2d)(float,float,float,float) r3.xyz, r0.zwzz, t13.xyzw, s9
  else
    mov r2.w, r0.y
  endif
  mul r0.z, -r2.w, cb5[25].z
  mul r0.z, r0.x, r0.z
  mul r0.z, r0.z, l(0.144269511)
  exp r0.z, r0.z
  add r0.z, -r0.z, l(1.000000)
  max r0.z, r0.z, l(0.000000)
  add r5.xyz, r1.xywx, -r3.xyzx
  mad r5.xyz, r0.zzzz, r5.xyzx, r3.xyzx
  mad r4.xyz, r5.xyzx, l(0.125000, 0.125000, 0.125000, 0.000000), r4.xyzx
else
  mul r0.z, r0.y, cb5[26].z
  mul r0.z, r0.z, l(0.200000)
  mul r0.zw, r0.zzzz, r7.xxxz
  div r0.zw, r0.zzzw, r1.zzzz
  mad r0.zw, v0.xxxy, cb0[18].zzzw, r0.zzzw
  div r5.xy, r0.zwzz, cb0[18].zwzz
  mad r5.xy, r5.xyxx, cb0[20].xyxx, cb0[20].zwzz
  sample_l_indexable(texture2d)(float,float,float,float) r2.w, r5.xyxx, t3.yzwx, s1, l(1.000000)
  add r2.w, r2.w, -cb0[51].z
  div r2.w, cb0[51].w, r2.w
  add r1.z, -r1.z, r2.w
  lt r2.w, l(0.000000), r1.z
  if_nz r2.w
    sample_indexable(texture2d)(float,float,float,float) r3.xyz, r0.zwzz, t13.xyzw, s9
  else
    mov r1.z, r0.y
  endif
  mul r0.z, -r1.z, cb5[25].z
  mul r0.z, r0.x, r0.z
  mul r0.z, r0.z, l(0.144269511)
  exp r0.z, r0.z
  add r0.z, -r0.z, l(1.000000)
  max r0.z, r0.z, l(0.000000)
  add r5.xyz, r1.xywx, -r3.xyzx
  mad r4.xyz, r0.zzzz, r5.xyzx, r3.xyzx
endif
max r0.z, cb5[26].y, l(0.001000)
div_sat r0.z, r0.y, r0.z
add r3.xyz, -r9.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r3.xyz, -r3.xyzx, r0.zzzz, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r0.y, -r0.y, cb5[25].z
mul r0.x, r0.x, r0.y
mul r0.x, r0.x, l(0.144269511)
exp r0.x, r0.x
add r0.x, -r0.x, l(1.000000)
max r0.x, r0.x, l(0.000000)
add r1.xyz, r1.xywx, -r4.xyzx
mad r0.xyw, r0.xxxx, r1.xyxz, r4.xyxz
mul r0.xyw, r0.xyxw, r3.xyxz
mad r0.xyz, r2.xyzx, r0.zzzz, r0.xywx
ubfe r0.w, l(3), l(2), cb0[1].x
uge r0.w, r0.w, l(5)
if_nz r0.w
  and r0.w, cb0[1].x, l(1)
  if_nz r0.w
    log r1.xyz, r0.xyzx
    round_ni r1.xyz, r1.xyzx
    add r1.xyz, r1.xyzx, l(-6.000000, -6.000000, -5.000000, 0.000000)
    exp r1.xyz, r1.xyzx
    ld_indexable(texture2darray)(float,float,float,float) r2.x, r13.xyww, t11.xyzw
    mov r2.yz, l(0,1.000000,-1.000000,0)
    mul r3.xyz, r1.xyzx, r2.xyyx
    mul r1.xyz, r1.xyzx, l(1.000000, 0.000000, 0.000000, 0.000000)
    lt r4.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r0.xyzx
    and r4.xyz, r4.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
    mad r1.xyz, r2.zxxz, r3.xyzx, r1.xyzx
    mad r0.xyz, r4.xyzx, r1.xyzx, r0.xyzx
  else
    ld_indexable(texture2darray)(float,float,float,float) r0.w, r13.xyww, t11.yzwx
    lt r1.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r0.xyzx
    and r1.xyz, r1.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
    mad r2.xyz, r0.wwww, l(-0.00392156886, 0.00392156886, 0.00392156886, 0.000000), l(0.00392156886, 0.000000, 0.000000, 0.000000)
    mad r0.xyz, r1.xyzx, r2.xyzx, r0.xyzx
  endif
endif
mov o0.xyz, r0.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 1352 instruction slots used
