//488341f911bbba3d-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Tue Feb 09 23:47:25 2016
//
//
// Buffer Definitions: 
//
// cbuffer cbTiledLighting
// {
//
//   uint g_uNumNonDirectionalLights;   // Offset:    0 Size:     4
//   uint g_uNumDirectionalLights;      // Offset:    4 Size:     4
//   uint g_uNumTilesX;                 // Offset:    8 Size:     4
//   uint g_uNumTilesY;                 // Offset:   12 Size:     4 [unused]
//   row_major float4x4 g_mProjection;  // Offset:   16 Size:    64 [unused]
//   row_major float4x4 g_mInvProjection;// Offset:   80 Size:    64 [unused]
//
// }
//
// cbuffer DrawableBuffer
// {
//
//   float4 FogColor;                   // Offset:    0 Size:    16 [unused]
//   float4 DebugColor;                 // Offset:   16 Size:    16 [unused]
//   float AlphaThreshold;              // Offset:   32 Size:     4
//   float4 __InstancedMaterialOpacity[256];// Offset:   48 Size:  4096
//
// }
//
// cbuffer SceneBuffer
// {
//
//   row_major float4x4 View;           // Offset:    0 Size:    64
//   row_major float4x4 ScreenMatrix;   // Offset:   64 Size:    64 [unused]
//   float2 DepthExportScale;           // Offset:  128 Size:     8 [unused]
//   float2 __padding0;                 // Offset:  136 Size:     8 [unused]
//   float4 FogParams;                  // Offset:  144 Size:    16 [unused]
//   float3 __CameraPosition;           // Offset:  160 Size:    12
//   float __padding12;                 // Offset:  172 Size:     4 [unused]
//   float3 CameraDirection;            // Offset:  176 Size:    12 [unused]
//   float __padding9;                  // Offset:  188 Size:     4 [unused]
//   float3 DepthFactors;               // Offset:  192 Size:    12 [unused]
//   float __padding10;                 // Offset:  204 Size:     4 [unused]
//   float3 ShadowDepthBiasAndLightType;// Offset:  208 Size:    12 [unused]
//   float __padding11;                 // Offset:  220 Size:     4 [unused]
//   float4 SubframeViewport;           // Offset:  224 Size:    16 [unused]
//   row_major float3x4 DepthToWorld;   // Offset:  240 Size:    48
//   float4 DepthToView;                // Offset:  288 Size:    16
//   float4 OneOverDepthToView;         // Offset:  304 Size:    16 [unused]
//   float4 DepthToW;                   // Offset:  320 Size:    16 [unused]
//   float4 ClipPlane;                  // Offset:  336 Size:    16 [unused]
//   float2 ViewportDepthScaleOffset;   // Offset:  352 Size:     8 [unused]
//   float2 __padding1;                 // Offset:  360 Size:     8 [unused]
//   float2 ColorDOFDepthScaleOffset;   // Offset:  368 Size:     8 [unused]
//   float2 __padding2;                 // Offset:  376 Size:     8 [unused]
//   float4 TimeVector;                 // Offset:  384 Size:    16
//   float4 FogParams2;                 // Offset:  400 Size:    16 [unused]
//   float4 FogParams3;                 // Offset:  416 Size:    16 [unused]
//   float3 GlobalAmbient;              // Offset:  432 Size:    12 [unused]
//   float __padding8;                  // Offset:  444 Size:     4 [unused]
//   float4 GlobalParams[16];           // Offset:  448 Size:   256 [unused]
//   float4 ViewToFogH;                 // Offset:  704 Size:    16 [unused]
//   float4 ScreenExtents;              // Offset:  720 Size:    16
//   float2 ScreenResolution;           // Offset:  736 Size:     8 [unused]
//   float2 __padding3;                 // Offset:  744 Size:     8 [unused]
//   float4 PSSMToMap1Lin;              // Offset:  752 Size:    16
//   float4 PSSMToMap1Const;            // Offset:  768 Size:    16
//   float4 PSSMToMap2Lin;              // Offset:  784 Size:    16
//   float4 PSSMToMap2Const;            // Offset:  800 Size:    16
//   float4 PSSMToMap3Lin;              // Offset:  816 Size:    16
//   float4 PSSMToMap3Const;            // Offset:  832 Size:    16
//   float4 PSSMDistances;              // Offset:  848 Size:    16
//   row_major float4x4 WorldToPSSM0;   // Offset:  864 Size:    64 [unused]
//   row_major float4x4 PrevViewProject;// Offset:  928 Size:    64 [unused]
//   row_major float4x4 PrevWorld;      // Offset:  992 Size:    64 [unused]
//   row_major float4x4 ViewT;          // Offset: 1056 Size:    64 [unused]
//   float4 PSSMExtents;                // Offset: 1120 Size:    16
//   float4 ShadowAtlasResolution;      // Offset: 1136 Size:    16
//   float4 UnitRimData[3];             // Offset: 1152 Size:    48 [unused]
//   float3 __CameraPositionForCorrection;// Offset: 1200 Size:    12 [unused]
//   float __padding7;                  // Offset: 1212 Size:     4 [unused]
//   row_major float4x4 CameraViewProject;// Offset: 1216 Size:    64 [unused]
//   float4 BackBufferResolution;       // Offset: 1280 Size:    16 [unused]
//   row_major float4x4 InverseProjection;// Offset: 1296 Size:    64 [unused]
//   float4 StereoOffset;               // Offset: 1360 Size:    16 [unused]
//   row_major float4x4 Projection;     // Offset: 1376 Size:    64 [unused]
//   row_major float4x4 ViewInv;        // Offset: 1440 Size:    64 [unused]
//   float4 ColorSSAO;                  // Offset: 1504 Size:    16 [unused]
//   float4 GlobalFogColor;             // Offset: 1520 Size:    16 [unused]
//   float4 VolumetricLightGlobalParams;// Offset: 1536 Size:    16 [unused]
//   float4 SnowParams01;               // Offset: 1552 Size:    16 [unused]
//   float4 SnowParams02;               // Offset: 1568 Size:    16 [unused]
//   float4 SnowParams03;               // Offset: 1584 Size:    16 [unused]
//   int SSREnabled;                    // Offset: 1600 Size:     4 [unused]
//   int __padding4;                    // Offset: 1604 Size:     4 [unused]
//   int __padding5;                    // Offset: 1608 Size:     4 [unused]
//   int __padding6;                    // Offset: 1612 Size:     4 [unused]
//
// }
//
// cbuffer MaterialBuffer
// {
//
//   float4 MaterialParams[512];        // Offset:    0 Size:  8192
//
// }
//
// Resource bind info for LightDataBuffer
// {
//
//   struct STiledLightData
//   {
//       
//       float3 vPosition;              // Offset:    0
//       float fSegmentLength;          // Offset:   12
//       float3 vDirection;             // Offset:   16
//       float fMinShadowSpec;          // Offset:   28
//       float4 vAttParams;             // Offset:   32
//       float3 vSpotParams;            // Offset:   48
//       float fIntensity;              // Offset:   60
//       float4 vDiffuseColor;          // Offset:   64
//       float4 vShadowFadeParams;      // Offset:   80
//       uint uRelCen;                  // Offset:   96
//       uint uFxSpecificIdx;           // Offset:  100
//       uint uFxType;                  // Offset:  104
//       float fRadiusSquared;          // Offset:  108
//       float3 vLambertWeights;        // Offset:  112
//       float fSpecularStrength;       // Offset:  124
//       float3 vBoxAxisX;              // Offset:  128
//       uint uLightType;               // Offset:  140
//       float3 vBoxAxisZ;              // Offset:  144
//       uint bShadowEnabled;           // Offset:  156
//       float3 vBoxInnerDistance;      // Offset:  160
//       uint bModulationMapEnabled;    // Offset:  172
//       float3 vBoxInvRange;           // Offset:  176
//       uint uModulationMapIndex;      // Offset:  188
//       row_major float4x4 mViewToShadowMap;// Offset:  192
//       row_major float4x4 mViewToModulationMap;// Offset:  256
//       float3 vRecipOuterColiProxy;   // Offset:  320
//       uint uProbeFlags;              // Offset:  332
//       float3 vColixProxyCen;         // Offset:  336
//       uint bForwardOnly;             // Offset:  348
//       uint uShadowType;              // Offset:  352
//       uint uNumSoftShadowSamples;    // Offset:  356
//       float fSoftShadowRadius;       // Offset:  360
//       float fSoftShadowDepthBias;    // Offset:  364
//       float fSoftShadowExponent;     // Offset:  368
//       float fProbePriority;          // Offset:  372
//       float fUnusedParam[2];         // Offset:  376
//
//   } $Element;                        // Offset:    0 Size:   384
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerGenericTrilinearWrap       sampler      NA          NA   11        1
// SamplerGenericBilinearWrap        sampler      NA          NA   12        1
// SamplerGenericBilinearClamp       sampler      NA          NA   13        1
// SamplerGenericShadowCompare     sampler_c      NA          NA   14        1
// p_default_Material_n117_n129_19B9FD0C15847118_Param_texture    texture  float4          2d    0        1
// p_default_Material_n117_n141_Texture_texture    texture  float4        cube    1        1
// p_default_Material_n108_n161_Texture_texture    texture  float4          2d    2        1
// p_default_Setup_n8_n53_Texture_texture    texture  float4          2d    3        1
// p_default_Setup_n6_n62_Texture_texture    texture  float4          2d    4        1
// p_default_Setup_n6_n63_Texture_texture    texture  float4          2d    5        1
// p_default_Setup_n6_n69_Texture_texture    texture  float4          2d    6        1
// p_default_Setup_n6_n73_Texture_texture    texture  float4          2d    7        1
// p_default_Setup_n6_n68_Texture_texture    texture  float4          2d    8        1
// GlobalModulationMapTextures[0]    texture  float4          2d   40        1
// ShadowMapSampler_texture          texture  float4          2d   43        1
// AttenuationSampler_texture        texture  float4          2d   44        1
// AmbientAccumulation_texture       texture  float4          2d   53        1
// LightDataBuffer                   texture  struct         r/o   54        1
// LightIndexBuffer                  texture   uint4         buf   55        1
// ModulationMaps                    texture  float4     2darray   56        1
// DrawableBuffer                    cbuffer      NA          NA    1        1
// SceneBuffer                       cbuffer      NA          NA    2        1
// MaterialBuffer                    cbuffer      NA          NA    3        1
// cbTiledLighting                   cbuffer      NA          NA    7        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy w
// TEXCOORD                 0   xyzw        1     NONE   float   xy  
// TEXCOORD                 2   xyz         2     NONE   float   xyz 
// TEXCOORD                 3   xyz         3     NONE   float   xyz 
// TEXCOORD                 4   xyz         4     NONE   float   xyz 
// PSIZE                    0   x           5     NONE    uint   x   
//
//
// 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 cb7[1], immediateIndexed
dcl_constantbuffer cb1[259], dynamicIndexed
// dcl_constantbuffer cb2[72], immediateIndexed
dcl_constantbuffer cb2[82], immediateIndexed
dcl_constantbuffer cb3[10], immediateIndexed
dcl_sampler s11, mode_default
dcl_sampler s12, mode_default
dcl_sampler s13, mode_default
dcl_sampler s14, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texturecube (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t40
dcl_resource_texture2d (float,float,float,float) t43
dcl_resource_texture2d (float,float,float,float) t44
dcl_resource_texture2d (float,float,float,float) t53
dcl_resource_structured t54, 384 
dcl_resource_buffer (uint,uint,uint,uint) t55
dcl_resource_texture2darray (float,float,float,float) t56
dcl_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyz
dcl_input_ps constant v5.x
dcl_output o0.xyzw
// dcl_temps 43
dcl_temps 45
dcl_resource_texture2d (float,float,float,float) t125
dp3 r0.x, v2.xyzx, v2.xyzx
rsq r0.x, r0.x
mul r0.yzw, r0.xxxx, v2.xxyz
mad r1.xy, v0.xyxx, cb2[45].zwzz, cb2[45].xyxx
mad r1.zw, r1.xxxy, cb2[18].xxxy, cb2[18].zzzw
mul r2.xy, r1.zwzz, v0.wwww
mov r2.z, v0.w

//View space correction, therefore need the InvProj._m00
ld_indexable(texture2d)(float,float,float,float) r44.xyzw, l(0, 0, 0, 0), t125.xyzw
add r44.w, v0.w, -r44.y
mul r44.w, r44.w, r44.x
mul r44.w, r44.w, cb2[81].x
add r2.x, r2.x, -r44.w


dp3 r1.z, -r2.xyzx, -r2.xyzx
rsq r1.z, r1.z
mul r3.xyz, r1.zzzz, -r2.xyzx
dp3 r4.x, r3.xyzx, cb2[0].xyzx
dp3 r4.y, r3.xyzx, cb2[1].xyzx
dp3 r4.z, r3.xyzx, cb2[2].xyzx
deriv_rty_fine r3.xy, v1.xyxx
deriv_rtx_fine r1.zw, v1.xxxy
mul r5.xy, r1.xyxx, v0.wwww
mov r5.z, v0.w
mov r5.w, l(1.000000)
dp4 r3.w, cb2[15].xyzw, r5.xyzw
dp4 r4.w, cb2[16].xyzw, r5.xyzw
dp4 r6.x, cb2[17].xyzw, r5.xyzw
deriv_rty_fine r7.x, r3.w
deriv_rty_fine r7.y, r4.w
deriv_rty_fine r7.z, r6.x
deriv_rtx_fine r8.z, r3.w
deriv_rtx_fine r8.x, r4.w
deriv_rtx_fine r8.y, r6.x
add r6.xy, v1.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
dp2 r3.w, r6.xyxx, r6.xyxx
sqrt r3.w, r3.w
ge r4.w, l(0.110000), r3.w
and r4.w, r4.w, l(0x3f800000)
dp3 r6.z, r8.zxyz, r0.yzwy
mad r8.xyz, -r6.zzzz, r0.zwyz, r8.xyzx
dp3 r6.z, r7.xyzx, r0.yzwy
mad r7.xyz, -r6.zzzz, r0.yzwy, r7.xyzx
mul r3.x, r3.x, r1.w
mad r1.z, r1.z, r3.y, -r3.x
lt r3.x, r1.z, l(0.000000)
movc r3.x, r3.x, l(-1.000000), l(1.000000)
mov r3.z, -r1.w
mul r3.yz, r3.yyzy, r3.xxxx
mul r9.xyz, r3.zzzz, r7.xyzx
mad r9.xyz, r8.zxyz, r3.yyyy, r9.xyzx
lt r1.z, l(0.000000), |r1.z|
dp3 r1.w, r9.xyzx, r9.xyzx
rsq r1.w, r1.w
mul r10.xyz, r1.wwww, r9.xyzx
movc r9.xyz, r1.zzzz, r10.xyzx, r9.xyzx
mul r10.xyz, r0.wyzw, r9.yzxy
mad r10.xyz, r0.zwyz, r9.zxyz, -r10.xyzx
mul r11.xyz, r0.wyzw, r8.xyzx
mad r8.xyz, r0.zwyz, r8.yzxy, -r11.xyzx
dp3 r1.z, r7.xyzx, r8.xyzx
lt r1.z, r1.z, l(0.000000)
movc r1.z, r1.z, l(-1.000000), l(1.000000)
mul r1.z, r1.z, r3.x
mul r3.xyz, r1.zzzz, r10.xyzx
add r1.w, r3.w, l(-0.050000)
mul_sat r1.w, r1.w, l(4.000000)
mad r3.w, r1.w, l(-2.000000), l(3.000000)
mul r1.w, r1.w, r1.w
mul r1.w, r1.w, r3.w
mul r1.w, r1.w, r4.w
mul r1.w, r1.w, l(10.000000)
min r1.w, r1.w, l(1.000000)
mul r3.w, r6.x, r6.x
mad r3.w, cb3[8].w, cb3[8].w, -r3.w
mad r3.w, -r6.y, r6.y, r3.w
lt r4.w, l(0.000000), r3.w
sqrt r3.w, r3.w
and r6.z, r3.w, r4.w
mul r3.w, cb3[8].w, cb3[9].x
lt r3.w, r6.z, r3.w
if_nz r3.w
  mov r7.xy, v1.xyxx
  mov r3.w, l(1.000000)
else 
  mul r5.xy, r1.xyxx, v0.wwww
  dp4 r8.x, cb2[15].xyzw, r5.xyzw
  dp4 r8.y, cb2[16].xyzw, r5.xyzw
  dp4 r8.z, cb2[17].xyzw, r5.xyzw
  add r5.xyz, r8.xyzx, -cb2[10].xyzx
  dp3 r4.w, r5.xyzx, r5.xyzx
  rsq r4.w, r4.w
  mul r5.xyz, r4.wwww, r5.xyzx
  ne r4.w, cb3[9].y, l(0.000000)
  div r5.w, l(1.000000, 1.000000, 1.000000, 1.000000), cb3[9].y
  and r4.w, r4.w, r5.w
  add r6.xy, v1.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
  dp3 r5.w, r6.xyzx, r6.xyzx
  rsq r5.w, r5.w
  mul r8.xyz, r5.wwww, r6.xyzx
  mul r11.xyz, r8.yzxy, l(0.000000, 0.000000, 1.000000, 0.000000)
  mad r11.xyz, r8.zxyz, l(1.000000, 0.000000, 0.000000, 0.000000), -r11.xyzx
  dp2 r5.w, r11.xzxx, r11.xzxx
  rsq r5.w, r5.w
  mul r11.xyz, r5.wwww, r11.xyzx
  mul r12.xyz, r8.zxyz, r11.yzxy
  mad r12.xyz, r8.yzxy, r11.zxyz, -r12.xyzx
  dp3 r5.w, r12.xyzx, r12.xyzx
  rsq r5.w, r5.w
  mul r12.xyz, r5.wwww, r12.xyzx
  mul r13.xyz, r9.xxxx, r11.xyzx
  mad r13.xyz, r8.xyzx, r0.yyyy, r13.xyzx
  mad r13.xyz, r12.xyzx, r3.xxxx, r13.xyzx
  mul r14.xyz, r9.yyyy, r11.xyzx
  mad r14.xyz, r8.xyzx, r0.zzzz, r14.xyzx
  mad r14.xyz, r12.xyzx, r3.yyyy, r14.xyzx
  mul r11.xyz, r9.zzzz, r11.xyzx
  mad r11.xyz, r8.xyzx, r0.wwww, r11.xyzx
  mad r11.xyz, r12.xzyx, r3.zzzz, r11.xzyx
  mul r12.xyz, r5.yyyy, r14.xyzx
  mad r5.xyw, r13.xyxz, r5.xxxx, r12.xyxz
  mad r5.xyz, r11.xzyx, r5.zzzz, r5.xywx
  dp3 r5.w, r5.xyzx, r8.xyzx
  mul r6.w, r4.w, r4.w
  mad r7.z, -r5.w, r5.w, l(1.000000)
  mad r6.w, -r6.w, r7.z, l(1.000000)
  sqrt r7.z, r6.w
  mad r5.w, r4.w, r5.w, r7.z
  ge r6.w, r6.w, l(0.000000)
  mul r12.xyz, r8.xyzx, r5.wwww
  mad r5.xyz, r4.wwww, r5.xyzx, -r12.xyzx
  and r5.xyz, r5.xyzx, r6.wwww
  dp3 r4.w, r8.xyzx, r5.xyzx
  ge r4.w, l(0.000000), r4.w
  if_nz r4.w
    ge r4.w, |r5.z|, l(0.000100)
    mad r5.w, cb3[9].x, cb3[8].w, -r6.z
    div r5.w, r5.w, r5.z
    mad r5.xyz, r5.wwww, r5.xyzx, r6.xyzx
    and r5.xyz, r4.wwww, r5.xyzx
    dp3 r4.w, r5.xyzx, r5.xyzx
    sqrt r4.w, r4.w
    lt r5.w, cb3[8].w, r4.w
    movc r3.w, r5.w, l(0), l(1.000000)
    eq r4.w, r4.w, l(0.000000)
    lt r5.z, r5.z, l(0.000000)
    add r5.xy, r5.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
    mad r6.x, -cb3[9].x, cb3[8].w, r6.z
    div r6.x, r6.x, cb3[8].w
    lt r6.y, r6.x, cb3[4].w
    div r6.x, r6.x, cb3[4].w
    mov r8.x, r13.z
    mov r8.y, r14.z
    mov r8.z, r11.y
    mad r12.xyz, -v2.xyzx, r0.xxxx, r8.xyzx
    mad r12.xyz, r6.xxxx, r12.xyzx, r0.yzwy
    mov r15.x, r13.x
    mov r15.y, r14.x
    mov r15.z, r11.x
    add r13.xzw, -r9.xxyz, r15.xxyz
    mad r13.xzw, r6.xxxx, r13.xxzw, r9.xxyz
    mov r11.x, r13.y
    mov r11.y, r14.y
    mad r10.xyz, -r10.xyzx, r1.zzzz, r11.xyzx
    mad r6.xzw, r6.xxxx, r10.xxyz, r3.xxyz
    movc r8.xyz, r6.yyyy, r12.xyzx, r8.xyzx
    movc r10.xyz, r6.yyyy, r13.xzwx, r15.xyzx
    movc r6.xyz, r6.yyyy, r6.xzwx, r11.xyzx
    movc r5.xy, r5.zzzz, l(0,1.000000,0,0), r5.xyxx
    or r0.x, r4.w, r5.z
    movc r5.xy, r4.wwww, l(1.000000,0,0,0), r5.xyxx
    or r0.x, r5.w, r0.x
    movc r0.yzw, r0.xxxx, r0.yyzw, r8.xxyz
    movc r9.xyz, r0.xxxx, r9.xyzx, r10.xyzx
    movc r3.xyz, r0.xxxx, r3.xyzx, r6.xyzx
    movc r7.xy, r5.wwww, l(0,0,0,0), r5.xyxx
  else 
    mov r7.xy, l(1.000000,0,0,0)
    mov r3.w, l(1.000000)
  endif 
endif 
mul r5.xyzw, r7.xyxy, cb3[1].zwxy
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r5.xyxx, t3.xyzw, s11
dp3 r0.x, l(0.300000, 0.590000, 0.110000, 0.000000), r6.xyzx
mul r1.z, r0.x, cb3[4].x
add r4.w, -cb3[4].z, cb3[4].y
mad r4.w, r0.x, r4.w, cb3[4].z
add r5.x, r4.w, l(2.000000)
mul r5.x, r5.x, l(0.010000)
mul r5.x, r5.x, r5.x
mul r6.xyzw, r7.xyxy, cb3[0].zwxy
sample_indexable(texture2d)(float,float,float,float) r6.xy, r6.xyxx, t7.xyzw, s11
mad r8.xy, r6.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r5.y, r8.xyxx, r8.xyxx
add r5.y, -r5.y, l(1.000000)
max r5.y, r5.y, l(0.000000)
sqrt r5.y, r5.y
mul r7.xyzw, r7.xyxy, cb3[2].zwxy
sample_indexable(texture2d)(float,float,float,float) r6.x, r7.xyxx, t5.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r7.xy, r7.zwzz, t8.xyzw, s11
mad r7.xy, r7.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r6.y, r7.xyxx, r7.xyxx
add r6.y, -r6.y, l(1.000000)
max r6.y, r6.y, l(0.000000)
sqrt r6.y, r6.y
sample_indexable(texture2d)(float,float,float,float) r6.zw, r6.zwzz, t6.zwxy, s11
mad r10.xy, r6.zwzz, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r6.z, r10.xyxx, r10.xyxx
add r6.z, -r6.z, l(1.000000)
max r6.z, r6.z, l(0.000000)
sqrt r11.z, r6.z
sample_indexable(texture2d)(float,float,float,float) r12.xyzw, r5.zwzz, t4.xyzw, s11
mul r11.xy, r10.xyxx, cb3[3].zzzz
dp3 r5.z, r11.xyzx, r11.xyzx
rsq r5.z, r5.z
mul r11.xyw, r5.zzzz, r11.xyxz
mul r13.xyz, r11.yyyy, v4.xyzx
mad r13.xyz, r11.xxxx, v3.xyzx, r13.xyzx
mad r11.xyw, r11.wwww, v2.xyxz, r13.xyxz
dp3 r5.z, r11.xywx, r11.xywx
rsq r5.z, r5.z
mul r11.xyw, r5.zzzz, r11.xyxw
add r7.z, -r6.y, l(1.000000)
add r8.z, -r5.y, l(1.000000)
mul r5.yzw, r7.xxyz, cb3[3].xxxx
mad r7.xyz, cb3[3].yyyy, r8.xyzx, r5.yzwy
add r7.w, -r7.z, l(1.000000)
dp3 r6.y, r7.xywx, r7.xywx
rsq r6.y, r6.y
mul r6.yzw, r6.yyyy, r7.xxyw
add r10.z, -r11.z, l(1.000000)
mad r5.yzw, cb3[3].zzzz, r10.xxyz, r5.yyzw
mad r7.xyz, cb3[3].wwww, r8.xyzx, r5.yzwy
add r7.w, -r7.z, l(1.000000)
dp3 r5.y, r7.xywx, r7.xywx
rsq r5.y, r5.y
mul r5.yzw, r5.yyyy, r7.xxyw
mul r7.xyz, r3.xyzx, r6.zzzz
mad r7.xyz, r6.yyyy, r9.xyzx, r7.xyzx
mad r6.yzw, r6.wwww, r0.yyzw, r7.xxyz
dp3 r7.x, r6.yzwy, r6.yzwy
rsq r7.x, r7.x
mul r6.yzw, r6.yyzw, r7.xxxx
mul r3.xyz, r3.xyzx, r5.zzzz
mad r3.xyz, r5.yyyy, r9.xyzx, r3.xyzx
mad r0.yzw, r5.wwww, r0.yyzw, r3.xxyz
dp3 r3.x, r0.yzwy, r0.yzwy
rsq r3.x, r3.x
mul r0.yzw, r0.yyzw, r3.xxxx
dp3 r3.x, r4.xyzx, r11.xywx
max r3.y, |r2.y|, |r2.x|
add r5.yzw, -r3.yyyy, cb2[70].yyzw
mov_sat r3.y, r3.x
div r3.z, l(1.000000, 1.000000, 1.000000, 1.000000), r3.y
add r7.xyz, cb3[5].xzyx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r7.w, r1.w, cb3[6].y
add r8.x, -r1.w, l(1.000000)
mul r8.x, r8.x, cb3[6].z
mul r1.w, r1.w, cb3[5].w
mov r2.w, l(1.000000)
mov r9.xyz, r2.xyzx
mov r9.w, l(1.000000)
mov r8.yzw, l(0,0,0,0)
mov r13.xyz, l(0,0,0,0)
mov r14.xyz, l(0,0,0,0)
mov r10.xyzw, l(0,0,0,0)
loop 
  uge r11.z, r10.w, cb7[0].y
  breakc_nz r11.z
  iadd r11.z, r10.w, cb7[0].x
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.xyz, r11.z, l(16), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.xyz, r11.z, l(64), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r13.w, r11.z, l(124), t54.xxxx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.w, r11.z, l(156), t54.xxxx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.w, r11.z, l(172), t54.xxxx
  dp3 r17.x, -r15.xyzx, cb2[0].xyzx
  dp3 r17.y, -r15.xyzx, cb2[1].xyzx
  dp3 r17.z, -r15.xyzx, cb2[2].xyzx
  if_nz r14.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.xyzw, r11.z, l(192), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyzw, r11.z, l(208), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.xyzw, r11.z, l(224), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r21.xyzw, r11.z, l(240), t54.xyzw
    mov r22.x, r18.x
    mov r22.y, r19.x
    mov r22.z, r20.x
    mov r22.w, r21.x
    dp4 r15.x, r2.xyzw, r22.xyzw
    mov r22.x, r18.y
    mov r22.y, r19.y
    mov r22.z, r20.y
    mov r22.w, r21.y
    dp4 r15.y, r2.xyzw, r22.xyzw
    mov r22.x, r18.z
    mov r22.y, r19.z
    mov r22.z, r20.z
    mov r22.w, r21.z
    dp4 r15.z, r2.xyzw, r22.xyzw
    mov r21.x, r18.w
    mov r21.y, r19.w
    mov r21.z, r20.w
    dp4 r14.w, r2.xyzw, r21.xyzw
    add r18.xyzw, -r14.wwww, cb2[53].xyzw
    min r18.yzw, r5.yyzw, r18.yyzw
    lt r18.yzw, l(0.000000, 0.000000, 0.000000, 0.000000), r18.yyzw
    movc r19.xyz, r18.yyyy, cb2[47].xyzx, cb2[47].wwww
    movc r20.xyz, r18.yyyy, cb2[48].xyzx, cb2[48].wwww
    movc r19.xyz, r18.zzzz, cb2[49].xyzx, r19.xyzx
    movc r20.xyz, r18.zzzz, cb2[50].xyzx, r20.xyzx
    movc r19.xyz, r18.wwww, cb2[51].xyzx, r19.xyzx
    movc r18.yzw, r18.wwww, cb2[52].xxyz, r20.xxyz
    mad r15.xyz, r15.xyzx, r19.xyzx, r18.yzwy
    lt r14.w, l(0.000000), r18.x
    mad r18.xyzw, cb2[71].zwzw, l(-0.500000, 0.500000, 0.500000, 0.500000), r15.xyxy
    sample_c_lz_indexable(texture2d)(float,float,float,float) r16.w, r18.xyxx, t43.xxxx, s14, r15.z
    sample_c_lz_indexable(texture2d)(float,float,float,float) r17.w, r18.zwzz, t43.xxxx, s14, r15.z
    add r16.w, r16.w, r17.w
    mad r18.xyzw, cb2[71].zwzw, l(-0.500000, -0.500000, 0.500000, -0.500000), r15.xyxy
    sample_c_lz_indexable(texture2d)(float,float,float,float) r15.x, r18.xyxx, t43.xxxx, s14, r15.z
    add r15.x, r15.x, r16.w
    sample_c_lz_indexable(texture2d)(float,float,float,float) r15.y, r18.zwzz, t43.xxxx, s14, r15.z
    add r15.x, r15.y, r15.x
    mul r15.x, r15.x, l(0.250000)
    movc r14.w, r14.w, r15.x, l(1.000000)
  else 
    mov r14.w, l(1.000000)
  endif 
  if_nz r15.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.xyzw, r11.z, l(256), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.xyzw, r11.z, l(272), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyzw, r11.z, l(288), t54.xyzw
    dp4 r11.z, r15.xyzw, r9.xyzw
    dp4 r15.x, r18.xyzw, r9.xyzw
    dp4 r15.y, r19.xyzw, r9.xyzw
    div r18.x, r11.z, r15.y
    div r18.y, r15.x, r15.y
    sample_l_indexable(texture2d)(float,float,float,float) r15.xyz, r18.xyxx, t40.xyzw, s12, l(0.000000)
  else 
    mov r15.xyz, l(1.000000,1.000000,1.000000,0)
  endif 
  add r18.xyz, r4.xyzx, r17.xyzx
  dp3 r11.z, r18.xyzx, r18.xyzx
  rsq r11.z, r11.z
  mul r18.xyz, r11.zzzz, r18.xyzx
  dp3_sat r11.z, r17.xyzx, r11.xywx
  dp3_sat r15.w, r4.xyzx, r18.xyzx
  dp3_sat r16.w, r18.xyzx, r11.xywx
  log r17.w, r16.w
  mul r17.w, r4.w, r17.w
  exp r17.w, r17.w
  max r15.w, r15.w, l(1.192092896E-007)
  min r18.x, r3.y, r11.z
  add r16.w, r16.w, r16.w
  mul r18.y, r16.w, r18.x
  ge r18.y, r15.w, r18.y
  eq r18.x, r3.y, r18.x
  div r11.z, r11.z, r3.y
  movc r11.z, r18.x, l(1.000000), r11.z
  mul r11.z, r16.w, r11.z
  div r11.z, r11.z, r15.w
  movc r11.z, r18.y, r11.z, r3.z
  mul r11.z, r17.w, r11.z
  mul r15.w, r11.z, cb3[6].x
  dp3 r16.w, r17.xyzx, r0.yzwy
  add r18.xy, r16.wwww, cb3[5].xzxx
  div r18.xy, r18.xyxx, r7.xyxx
  max r18.xy, r18.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
  dp3 r16.w, r17.xyzx, r6.yzwy
  add r16.w, r16.w, cb3[5].y
  div r16.w, r16.w, r7.z
  max r16.w, r16.w, l(0.000000)
  mul r17.x, r8.x, r18.y
  mad_sat r17.x, r7.w, r18.x, r17.x
  mul_sat r16.w, r1.w, r16.w
  mul r16.w, r14.w, r16.w
  mul r17.xyz, r16.xyzx, r17.xxxx
  mul r17.xyz, r15.xyzx, r17.xyzx
  mul r18.xyz, r16.xyzx, r15.wwww
  mul r15.xyz, r15.xyzx, r18.xyzx
  mul r15.xyz, r14.wwww, r15.xyzx
  mad r8.yzw, r17.xxyz, r14.wwww, r8.yyzw
  mad r10.xyz, r15.xyzx, r13.wwww, r10.xyzx
  mad r13.xyz, r16.wwww, r16.xyzx, r13.xyzx
  mad r14.xyz, cb3[6].xxxx, r11.zzzz, r14.xyzx
  iadd r10.w, r10.w, l(1)
endloop 
if_nz cb7[0].x
  mul r5.yz, v0.xxyx, l(0.000000, 0.062500, 0.062500, 0.000000)
  round_ni r5.yz, r5.yyzy
  utof r2.w, cb7[0].z
  mad r2.w, r5.z, r2.w, r5.y
  ftou r2.w, r2.w
  ishl r2.w, r2.w, l(1)
  dp3 r5.y, r9.xyzx, r9.xyzx
  sqrt r5.y, r5.y
  mov r15.xyz, r9.xyzx
  mov r15.w, l(1.000000)
  mov r9.w, l(1.000000)
  mov r16.xyz, r8.yzwy
  mov r17.xyz, r10.xyzx
  mov r18.xyz, r13.xyzx
  mov r19.xyz, r14.xyzx
  mov r5.z, l(0)
  loop 
    uge r5.w, r5.z, l(2)
    breakc_nz r5.w
    iadd r5.w, r2.w, r5.z
    ld_indexable(buffer)(uint,uint,uint,uint) r20.xyzw, r5.wwww, t55.xyzw
    ushr r21.xyzw, r20.xyzw, l(30, 30, 30, 30)
    iadd r5.w, r21.y, r21.x
    iadd r5.w, r21.z, r5.w
    iadd r5.w, r21.w, r5.w
    mov r21.xyz, r16.xyzx
    mov r22.xyz, r17.xyzx
    mov r23.xyz, r18.xyzx
    mov r24.xyz, r19.xyzx
    mov r10.w, l(0)
    loop 
      uge r11.z, r10.w, r5.w
      breakc_nz r11.z
      ult r25.xyz, r10.wwww, l(3, 6, 9, 0)
      iadd r26.xyz, r10.wwww, l(-3, -6, -9, 0)
      movc r11.z, r25.z, r26.y, r26.z
      movc r11.z, r25.y, r26.x, r11.z
      movc r11.z, r25.x, r10.w, r11.z
      movc r13.w, r25.z, r20.z, r20.w
      movc r13.w, r25.y, r20.y, r13.w
      movc r13.w, r25.x, r20.x, r13.w
      imul null, r11.z, r11.z, l(10)
      ushr r11.z, r13.w, r11.z
      and r11.z, r11.z, l(1023)
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r13.w, r11.z, l(140), t54.xxxx
      mov r25.xyz, r21.xyzx
      mov r26.xyz, r22.xyzx
      mov r27.xyz, r23.xyzx
      mov r28.xyz, r24.xyzx
      mov r14.w, r10.w
      mov r16.w, r11.z
      mov r17.w, r13.w
      loop 
        ult r18.w, r14.w, r5.w
        ieq r29.xy, r17.wwww, l(0, 1, 0, 0)
        or r19.w, r29.y, r29.x
        and r18.w, r18.w, r19.w
        breakc_z r18.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r29.xzw, r16.w, l(0), t54.xxyz
        if_nz r29.y
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r30.xyzw, r16.w, l(12), t54.xyzw
          add r31.xyz, r9.xyzx, -r29.xzwx
          dp3 r18.w, r31.xyzx, r30.yzwy
          max r18.w, r18.w, l(0.000000)
          min r18.w, r30.x, r18.w
          mad r29.xzw, r18.wwww, r30.yyzw, r29.xxzw
        endif 
        add r29.xyz, -r2.xyzx, r29.xzwx
        dp3 r18.w, r29.xyzx, r29.xyzx
        sqrt r18.w, r18.w
        div r29.xyz, r29.xyzx, r18.wwww
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r30.xyz, r16.w, l(64), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.w, r16.w, l(124), t54.xxxx
        dp3 r31.x, r29.xyzx, cb2[0].xyzx
        dp3 r31.y, r29.xyzx, cb2[1].xyzx
        dp3 r31.z, r29.xyzx, cb2[2].xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r21.w, r16.w, l(32), t54.xxxx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r29.yz, r16.w, l(40), t54.xxyx
        mad_sat r29.x, r18.w, r21.w, r29.y
        sample_l_indexable(texture2d)(float,float,float,float) r18.w, r29.xzxx, t44.xywz, s13, l(0.000000)
        add r29.xyz, r4.xyzx, r31.xyzx
        dp3 r21.w, r29.xyzx, r29.xyzx
        rsq r21.w, r21.w
        mul r29.xyz, r21.wwww, r29.xyzx
        dp3_sat r21.w, r31.xyzx, r11.xywx
        dp3_sat r22.w, r4.xyzx, r29.xyzx
        dp3_sat r23.w, r29.xyzx, r11.xywx
        log r24.w, r23.w
        mul r24.w, r4.w, r24.w
        exp r24.w, r24.w
        max r22.w, r22.w, l(1.192092896E-007)
        min r25.w, r3.y, r21.w
        add r23.w, r23.w, r23.w
        mul r26.w, r23.w, r25.w
        ge r26.w, r22.w, r26.w
        eq r25.w, r3.y, r25.w
        div r21.w, r21.w, r3.y
        movc r21.w, r25.w, l(1.000000), r21.w
        mul r21.w, r23.w, r21.w
        div r21.w, r21.w, r22.w
        movc r21.w, r26.w, r21.w, r3.z
        mul r21.w, r24.w, r21.w
        mul r22.w, r21.w, cb3[6].x
        dp3 r23.w, r31.xyzx, r0.yzwy
        add r29.xy, r23.wwww, cb3[5].xzxx
        div r29.xy, r29.xyxx, r7.xyxx
        max r29.xy, r29.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
        dp3 r23.w, r31.xyzx, r6.yzwy
        add r23.w, r23.w, cb3[5].y
        div r23.w, r23.w, r7.z
        max r23.w, r23.w, l(0.000000)
        mul r24.w, r8.x, r29.y
        mad_sat r24.w, r7.w, r29.x, r24.w
        mul_sat r23.w, r1.w, r23.w
        mul r23.w, r18.w, r23.w
        mul r29.xyz, r30.xyzx, r24.wwww
        mul r31.xyz, r30.xyzx, r22.wwww
        mul r31.xyz, r18.wwww, r31.xyzx
        mad r25.xyz, r29.xyzx, r18.wwww, r25.xyzx
        mad r26.xyz, r31.xyzx, r19.wwww, r26.xyzx
        mad r27.xyz, r23.wwww, r30.xyzx, r27.xyzx
        mad r28.xyz, cb3[6].xxxx, r21.wwww, r28.xyzx
        iadd r18.w, r14.w, l(1)
        ult r19.w, r18.w, r5.w
        if_nz r19.w
          ult r29.xyz, r18.wwww, l(3, 6, 9, 0)
          iadd r30.xyz, r14.wwww, l(-2, -5, -8, 0)
          movc r19.w, r29.z, r30.y, r30.z
          movc r19.w, r29.y, r30.x, r19.w
          movc r19.w, r29.x, r18.w, r19.w
          movc r21.w, r29.z, r20.z, r20.w
          movc r21.w, r29.y, r20.y, r21.w
          movc r21.w, r29.x, r20.x, r21.w
          imul null, r19.w, r19.w, l(10)
          ushr r19.w, r21.w, r19.w
          and r16.w, r19.w, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.w, r16.w, l(140), t54.xxxx
        endif 
        mov r14.w, r18.w
      endloop 
      mov r29.xyz, r25.xyzx
      mov r30.xyz, r26.xyzx
      mov r31.xyz, r27.xyzx
      mov r32.xyz, r28.xyzx
      mov r11.z, r14.w
      mov r13.w, r16.w
      mov r18.w, r17.w
      loop 
        ult r19.w, r11.z, r5.w
        ieq r33.xy, r18.wwww, l(2, 3, 0, 0)
        or r21.w, r33.y, r33.x
        and r19.w, r19.w, r21.w
        breakc_z r19.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r33.xzw, r13.w, l(16), t54.xxyz
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r34.xyz, r13.w, l(0), t54.xyzx
        if_nz r33.y
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r35.xyz, r13.w, l(128), t54.xyzx
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.w, r13.w, l(12), t54.xxxx
          add r36.xyz, r9.xyzx, -r34.xyzx
          dp3 r21.w, r36.xyzx, r35.xyzx
          max r21.w, r21.w, l(0.000000)
          min r19.w, r19.w, r21.w
          mad r34.xyz, r19.wwww, r35.xyzx, r34.xyzx
        endif 
        add r34.xyz, -r2.xyzx, r34.xyzx
        dp3 r19.w, r34.xyzx, r34.xyzx
        sqrt r19.w, r19.w
        div r34.xyz, r34.xyzx, r19.wwww
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r35.xyz, r13.w, l(64), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r21.w, r13.w, l(124), t54.xxxx
        dp3 r36.x, r34.xyzx, cb2[0].xyzx
        dp3 r36.y, r34.xyzx, cb2[1].xyzx
        dp3 r36.z, r34.xyzx, cb2[2].xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r37.xyz, r13.w, l(32), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r38.xyzw, r13.w, l(44), t54.xyzw
        mov r37.w, r38.x
        mad r37.xy, r19.wwww, r37.xyxx, r37.zwzz
        dp3 r22.w, r34.xyzx, -r33.xzwx
        mad_sat r23.w, r22.w, r38.y, r38.z
        mul r24.w, r23.w, r23.w
        mad r23.w, -r23.w, l(2.000000), l(3.000000)
        mul r23.w, r23.w, r24.w
        mul r23.w, r23.w, r23.w
        mul r19.w, r19.w, r22.w
        lt r19.w, r19.w, r38.w
        movc r19.w, r19.w, l(0), r23.w
        sample_l_indexable(texture2d)(float,float,float,float) r22.w, r37.xyxx, t44.xywz, s13, l(0.000000)
        mul r19.w, r19.w, r22.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.w, r13.w, l(172), t54.xxxx
        if_nz r22.w
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.w, r13.w, l(188), t54.xxxx
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r33.xyzw, r13.w, l(256), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r34.xyzw, r13.w, l(272), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r37.xyzw, r13.w, l(288), t54.xyzw
          dp4 r23.w, r33.xyzw, r15.xyzw
          dp4 r24.w, r34.xyzw, r15.xyzw
          dp4 r25.w, r37.xyzw, r15.xyzw
          div r33.x, r23.w, r25.w
          div r33.y, r24.w, r25.w
          utof r33.z, r22.w
          sample_l_indexable(texture2darray)(float,float,float,float) r33.xyz, r33.xyzx, t56.xyzw, s12, l(0.000000)
        else 
          mov r33.xyz, l(1.000000,1.000000,1.000000,0)
        endif 
        dp3 r22.w, r33.xyzx, r33.xyzx
        mul r22.w, r19.w, r22.w
        lt r22.w, cb2[24].w, r22.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.w, r13.w, l(156), t54.xxxx
        ine r23.w, r23.w, l(0)
        and r22.w, r22.w, r23.w
        if_nz r22.w
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r34.xyzw, r13.w, l(192), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r37.xyzw, r13.w, l(208), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r38.xyzw, r13.w, l(224), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r39.xyzw, r13.w, l(240), t54.xyzw
          mov r40.x, r34.x
          mov r40.y, r37.x
          mov r40.z, r38.x
          mov r40.w, r39.x
          dp4 r40.x, r9.xyzw, r40.xyzw
          mov r41.x, r34.y
          mov r41.y, r37.y
          mov r41.z, r38.y
          mov r41.w, r39.y
          dp4 r40.y, r9.xyzw, r41.xyzw
          mov r41.x, r34.z
          mov r41.y, r37.z
          mov r41.z, r38.z
          mov r41.w, r39.z
          dp4 r22.w, r9.xyzw, r41.xyzw
          mov r39.x, r34.w
          mov r39.y, r37.w
          mov r39.z, r38.w
          dp4 r23.w, r9.xyzw, r39.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r34.xyzw, r13.w, l(80), t54.xyzw
          mad_sat r34.xy, r5.yyyy, r34.xyxx, r34.zwzz
          div r37.xyzw, r40.xyxy, r23.wwww
          mad r38.xyzw, cb2[71].zwzw, l(-0.500000, 0.500000, 0.500000, 0.500000), r37.zwzw
          sample_c_lz_indexable(texture2d)(float,float,float,float) r23.w, r38.xyxx, t43.xxxx, s14, r22.w
          sample_c_lz_indexable(texture2d)(float,float,float,float) r24.w, r38.zwzz, t43.xxxx, s14, r22.w
          add r23.w, r23.w, r24.w
          mad r37.xyzw, cb2[71].zwzw, l(-0.500000, -0.500000, 0.500000, -0.500000), r37.xyzw
          sample_c_lz_indexable(texture2d)(float,float,float,float) r24.w, r37.xyxx, t43.xxxx, s14, r22.w
          add r23.w, r23.w, r24.w
          sample_c_lz_indexable(texture2d)(float,float,float,float) r22.w, r37.zwzz, t43.xxxx, s14, r22.w
          add r22.w, r22.w, r23.w
          mul r22.w, r22.w, l(0.250000)
          mad r22.w, r22.w, r34.x, r34.y
        else 
          mov r22.w, l(1.000000)
        endif 
        add r34.xyz, r4.xyzx, r36.xyzx
        dp3 r23.w, r34.xyzx, r34.xyzx
        rsq r23.w, r23.w
        mul r34.xyz, r23.wwww, r34.xyzx
        dp3_sat r23.w, r36.xyzx, r11.xywx
        dp3_sat r24.w, r4.xyzx, r34.xyzx
        dp3_sat r25.w, r34.xyzx, r11.xywx
        log r26.w, r25.w
        mul r26.w, r4.w, r26.w
        exp r26.w, r26.w
        max r24.w, r24.w, l(1.192092896E-007)
        min r27.w, r3.y, r23.w
        add r25.w, r25.w, r25.w
        mul r28.w, r25.w, r27.w
        ge r28.w, r24.w, r28.w
        eq r27.w, r3.y, r27.w
        div r23.w, r23.w, r3.y
        movc r23.w, r27.w, l(1.000000), r23.w
        mul r23.w, r25.w, r23.w
        div r23.w, r23.w, r24.w
        movc r23.w, r28.w, r23.w, r3.z
        mul r23.w, r26.w, r23.w
        mul r24.w, r23.w, cb3[6].x
        dp3 r25.w, r36.xyzx, r0.yzwy
        add r34.xy, r25.wwww, cb3[5].xzxx
        div r34.xy, r34.xyxx, r7.xyxx
        max r34.xy, r34.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
        dp3 r25.w, r36.xyzx, r6.yzwy
        add r25.w, r25.w, cb3[5].y
        div r25.w, r25.w, r7.z
        max r25.w, r25.w, l(0.000000)
        mul r26.w, r8.x, r34.y
        mad_sat r26.w, r7.w, r34.x, r26.w
        mul_sat r25.w, r1.w, r25.w
        mul r25.w, r19.w, r25.w
        mul r25.w, r22.w, r25.w
        mul r34.xyz, r35.xyzx, r26.wwww
        mul r34.xyz, r33.xyzx, r34.xyzx
        mul r34.xyz, r22.wwww, r34.xyzx
        mul r36.xyz, r35.xyzx, r24.wwww
        mul r33.xyz, r33.xyzx, r36.xyzx
        mul r33.xyz, r22.wwww, r33.xyzx
        mul r33.xyz, r19.wwww, r33.xyzx
        mad r29.xyz, r34.xyzx, r19.wwww, r29.xyzx
        mad r30.xyz, r33.xyzx, r21.wwww, r30.xyzx
        mad r31.xyz, r25.wwww, r35.xyzx, r31.xyzx
        mad r32.xyz, cb3[6].xxxx, r23.wwww, r32.xyzx
        iadd r19.w, r11.z, l(1)
        ult r21.w, r19.w, r5.w
        if_nz r21.w
          ult r33.xyz, r19.wwww, l(3, 6, 9, 0)
          iadd r34.xyz, r11.zzzz, l(-2, -5, -8, 0)
          movc r21.w, r33.z, r34.y, r34.z
          movc r21.w, r33.y, r34.x, r21.w
          movc r21.w, r33.x, r19.w, r21.w
          movc r22.w, r33.z, r20.z, r20.w
          movc r22.w, r33.y, r20.y, r22.w
          movc r22.w, r33.x, r20.x, r22.w
          imul null, r21.w, r21.w, l(10)
          ushr r21.w, r22.w, r21.w
          and r13.w, r21.w, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.w, r13.w, l(140), t54.xxxx
        endif 
        mov r11.z, r19.w
      endloop 
      mov r21.xyz, r29.xyzx
      mov r22.xyz, r30.xyzx
      mov r23.xyz, r31.xyzx
      mov r24.xyz, r32.xyzx
      mov r19.w, r11.z
      mov r21.w, r13.w
      mov r22.w, r18.w
      loop 
        ult r23.w, r19.w, r5.w
        ieq r24.w, r22.w, l(4)
        and r23.w, r23.w, r24.w
        breakc_z r23.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r33.xyz, r21.w, l(0), t54.xyzx
        add r33.xyz, -r2.xyzx, r33.xyzx
        dp3 r23.w, r33.xyzx, r33.xyzx
        sqrt r23.w, r23.w
        div r34.xyz, r33.xyzx, r23.wwww
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r35.xyz, r21.w, l(64), t54.xyzx
        dp3 r36.x, r34.xyzx, cb2[0].xyzx
        dp3 r36.y, r34.xyzx, cb2[1].xyzx
        dp3 r36.z, r34.xyzx, cb2[2].xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r34.xyz, r21.w, l(16), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r37.y, r21.w, l(44), t54.xxxx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r38.xyzw, r21.w, l(124), t54.xyzw
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r39.xyz, r21.w, l(144), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r40.xyz, r21.w, l(160), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r41.xyz, r21.w, l(176), t54.xyzx
        dp3 r42.x, r33.xyzx, r38.yzwy
        dp3 r42.y, r33.xyzx, r34.xyzx
        dp3 r42.z, r33.xyzx, r39.xyzx
        add r33.xyz, -r40.xyzx, |r42.xyzx|
        mul_sat r33.xyz, r41.xyzx, r33.xyzx
        max r23.w, r33.y, r33.x
        max r37.x, r33.z, r23.w
        sample_l_indexable(texture2d)(float,float,float,float) r23.w, r37.xyxx, t44.xywz, s13, l(0.000000)
        add r33.xyz, r4.xyzx, r36.xyzx
        dp3 r24.w, r33.xyzx, r33.xyzx
        rsq r24.w, r24.w
        mul r33.xyz, r24.wwww, r33.xyzx
        dp3_sat r24.w, r36.xyzx, r11.xywx
        dp3_sat r25.w, r4.xyzx, r33.xyzx
        dp3_sat r26.w, r33.xyzx, r11.xywx
        log r27.w, r26.w
        mul r27.w, r4.w, r27.w
        exp r27.w, r27.w
        max r25.w, r25.w, l(1.192092896E-007)
        min r28.w, r3.y, r24.w
        add r26.w, r26.w, r26.w
        mul r29.w, r26.w, r28.w
        ge r29.w, r25.w, r29.w
        eq r28.w, r3.y, r28.w
        div r24.w, r24.w, r3.y
        movc r24.w, r28.w, l(1.000000), r24.w
        mul r24.w, r26.w, r24.w
        div r24.w, r24.w, r25.w
        movc r24.w, r29.w, r24.w, r3.z
        mul r24.w, r27.w, r24.w
        mul r25.w, r24.w, cb3[6].x
        dp3 r26.w, r36.xyzx, r0.yzwy
        add r33.xy, r26.wwww, cb3[5].xzxx
        div r33.xy, r33.xyxx, r7.xyxx
        max r33.xy, r33.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
        dp3 r26.w, r36.xyzx, r6.yzwy
        add r26.w, r26.w, cb3[5].y
        div r26.w, r26.w, r7.z
        max r26.w, r26.w, l(0.000000)
        mul r27.w, r8.x, r33.y
        mad_sat r27.w, r7.w, r33.x, r27.w
        mul_sat r26.w, r1.w, r26.w
        mul r26.w, r23.w, r26.w
        mul r33.xyz, r35.xyzx, r27.wwww
        mul r34.xyz, r35.xyzx, r25.wwww
        mul r34.xyz, r23.wwww, r34.xyzx
        mad r21.xyz, r33.xyzx, r23.wwww, r21.xyzx
        mad r22.xyz, r34.xyzx, r38.xxxx, r22.xyzx
        mad r23.xyz, r26.wwww, r35.xyzx, r23.xyzx
        mad r24.xyz, cb3[6].xxxx, r24.wwww, r24.xyzx
        iadd r23.w, r19.w, l(1)
        ult r24.w, r23.w, r5.w
        if_nz r24.w
          ult r33.xyz, r23.wwww, l(3, 6, 9, 0)
          iadd r34.xyz, r19.wwww, l(-2, -5, -8, 0)
          movc r24.w, r33.z, r34.y, r34.z
          movc r24.w, r33.y, r34.x, r24.w
          movc r24.w, r33.x, r23.w, r24.w
          movc r25.w, r33.z, r20.z, r20.w
          movc r25.w, r33.y, r20.y, r25.w
          movc r25.w, r33.x, r20.x, r25.w
          imul null, r24.w, r24.w, l(10)
          ushr r24.w, r25.w, r24.w
          and r21.w, r24.w, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.w, r21.w, l(140), t54.xxxx
        endif 
        mov r19.w, r23.w
      endloop 
      uge r21.w, r22.w, l(5)
      iadd r10.w, r19.w, -r21.w
    endloop 
    ult r5.w, r5.w, l(12)
    if_nz r5.w
      mov r16.xyz, r21.xyzx
      mov r17.xyz, r22.xyzx
      mov r18.xyz, r23.xyzx
      mov r19.xyz, r24.xyzx
      break 
    endif 
    iadd r5.z, r5.z, l(1)
    mov r16.xyz, r21.xyzx
    mov r17.xyz, r22.xyzx
    mov r18.xyz, r23.xyzx
    mov r19.xyz, r24.xyzx
  endloop 
  mov r8.yzw, r16.xxyz
  mov r10.xyz, r17.xyzx
  mov r13.xyz, r18.xyzx
  mov r14.xyz, r19.xyzx
endif 
mul r0.y, r1.z, r5.x
add r2.xyz, r10.xyzx, -r14.xyzx
mad r2.xyz, cb3[6].wwww, r2.xyzx, r14.xyzx
add r0.x, -r0.x, l(1.000000)
mul r3.xyz, r11.xywx, r3.xxxx
mad r3.xyz, r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r4.xyzx
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r1.xyxx, t0.xyzw, s11
mul r0.x, r0.x, cb3[7].w
sample_b_indexable(texturecube)(float,float,float,float) r0.xzw, r3.xyzx, t1.xwyz, s11, r0.x
mul r0.xzw, r0.xxzw, cb3[8].yyyy
ftoi r4.xy, v0.xyxx
mov r4.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r3.xyz, r4.xyzw, t53.xyzw
add r4.xyz, r8.yzwy, r3.xyzx
add r1.xyz, r1.xyzx, r3.xyzx
add r1.xyz, -r4.xyzx, r1.xyzx
mad r3.xyz, cb3[8].xxxx, r1.xyzx, r4.xyzx
mad r1.xyz, cb3[8].zzzz, r1.xyzx, r4.xyzx
add r1.xyz, r13.xyzx, r1.xyzx
add r1.xyz, -r3.xyzx, r1.xyzx
mad r1.xyz, r6.xxxx, r1.xyzx, r3.xyzx
max r1.w, r1.y, r1.x
max r1.w, r1.z, r1.w
add r1.w, r1.w, cb3[7].z
mad r0.xzw, r1.wwww, r0.xxzw, r2.xxyz
mul r0.xyz, r0.yyyy, r0.xzwx
max r0.w, r0.z, r0.y
max r0.w, r0.w, r0.x
lt r1.w, l(0.000000), r0.w
lt r2.x, r0.w, l(1.000000)
and r1.w, r1.w, r2.x
ge r2.x, l(0.000000), r0.w
movc r2.x, r2.x, l(0), l(1.000000)
movc r0.w, r1.w, r0.w, r2.x
add r0.w, -r0.w, l(1.000000)
mad r1.w, -r3.w, r12.w, l(1.000000)
mad r0.w, -r0.w, r1.w, l(1.000000)
mul r2.xy, v0.xyxx, l(0.250000, 0.250000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r1.w, r2.xyxx, t2.yzwx, s11
mov r2.x, v5.x
mad r1.w, r1.w, cb1[r2.x + 3].y, cb1[r2.x + 3].z
mad o0.xyz, r1.xyzx, r12.xyzx, r0.xyzx
add r0.x, r0.w, -cb1[2].x
min r0.x, r1.w, r0.x
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mov o0.w, r0.w
ret 
// Approximately 861 instruction slots used
