//19f86d3452a8615c-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Tue Feb 16 20:14:51 2016
//
//
// Buffer Definitions: 
//
// cbuffer cbTiledLighting
// {
//
//   uint g_uNumNonDirectionalLights;   // Offset:    0 Size:     4
//   uint g_uNumDirectionalLights;      // Offset:    4 Size:     4 [unused]
//   uint g_uNumTilesX;                 // Offset:    8 Size:     4
//   uint g_uNumTilesY;                 // Offset:   12 Size:     4
//   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 [unused]
//   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 [unused]
//   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 [unused]
//   float4 FogParams2;                 // Offset:  400 Size:    16 [unused]
//   float4 FogParams3;                 // Offset:  416 Size:    16 [unused]
//   float3 GlobalAmbient;              // Offset:  432 Size:    12
//   float __padding8;                  // Offset:  444 Size:     4 [unused]
//   float4 GlobalParams[16];           // Offset:  448 Size:   256
//   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 [unused]
//   float4 PSSMToMap1Const;            // Offset:  768 Size:    16 [unused]
//   float4 PSSMToMap2Lin;              // Offset:  784 Size:    16 [unused]
//   float4 PSSMToMap2Const;            // Offset:  800 Size:    16 [unused]
//   float4 PSSMToMap3Lin;              // Offset:  816 Size:    16 [unused]
//   float4 PSSMToMap3Const;            // Offset:  832 Size:    16 [unused]
//   float4 PSSMDistances;              // Offset:  848 Size:    16 [unused]
//   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 [unused]
//   float4 ShadowAtlasResolution;      // Offset: 1136 Size:    16 [unused]
//   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
//   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
//
// }
//
// cbuffer InstanceBuffer
// {
//
//   struct InstanceStruct
//   {
//       
//       float4 InstanceParams[8];      // Offset:    0
//
//   } InstanceParameters[256];         // Offset:    0 Size: 32768
//
// }
//
// cbuffer IrradianceBuffer
// {
//
//   float4 IrradianceStateRed0;        // Offset:    0 Size:    16
//   float4 IrradianceStateRed1;        // Offset:   16 Size:    16
//   float4 IrradianceStateGreen0;      // Offset:   32 Size:    16
//   float4 IrradianceStateGreen1;      // Offset:   48 Size:    16
//   float4 IrradianceStateBlue0;       // Offset:   64 Size:    16
//   float4 IrradianceStateBlue1;       // Offset:   80 Size:    16
//   float4 IrradianceStateBase;        // Offset:   96 Size:    16
//   float4 IrradianceConstantData;     // Offset:  112 Size:    16
//
// }
//
// 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
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerGenericPointClamp          sampler      NA          NA   10        1
// SamplerGenericTrilinearWrap       sampler      NA          NA   11        1
// SamplerGenericBilinearClamp       sampler      NA          NA   13        1
// p_default_Material_n198_n220_n227_661830C016465534_cp0_Param_texture    texture  float4          2d    0        1
// p_default_Setup_n16_47D689602565118_cp5_Param_texture    texture  float4          2d    1        1
// p_default_Setup_n16_n117_Texture_texture    texture  float4          2d    2        1
// p_default_Material_n202_5423B6201464972_cp8_Param_texture    texture  float4          2d    3        1
// p_default_Setup_n34_470EB2D06866788_cp8_Param_texture    texture  float4          2d    4        1
// p_default_Setup_n19_n57_Texture_texture    texture  float4          2d    5        1
// p_default_Setup_n33_470EB2D06866788_cp8_Param_texture    texture  float4          2d    6        1
// p_default_Setup_n19_n59_Texture_texture    texture  float4          2d    7        1
// p_default_Setup_n33_n57_Texture_texture    texture  float4          2d    8        1
// p_default_Setup_n38_Texture_texture    texture  float4          2d    9        1
// p_default_Setup_n40_n59_Texture_texture    texture  float4          2d   10        1
// p_default_Setup_n33_n59_Texture_texture    texture  float4          2d   12        1
// p_default_Setup_n8_NormalBufferTexture_texture    texture  float4          2d   13        1
// p_default_Setup_n23_Texture_texture    texture  float4          2d   14        1
// p_default_Setup_n40_n57_Texture_texture    texture  float4          2d   15        1
// p_default_Material_n204_n207_Texture_texture    texture  float4          2d   16        1
// p_default_Setup_n34_n57_Texture_texture    texture  float4          2d   17        1
// p_default_Setup_n16_n104_Texture_texture    texture  float4          2d   18        1
// p_default_Setup_n5_n84_Texture_texture    texture  float4          2d   19        1
// p_default_Setup_n34_n59_Texture_texture    texture  float4          2d   20        1
// p_default_Setup_n5_471057409100914_cp8_Param_texture    texture  float4          2d   21        1
// p_default_Setup_n5_n104_Texture_texture    texture  float4          2d   22        1
// AttenuationSampler_texture        texture  float4          2d   44        1
// LightAccumulation_texture         texture  float4          2d   51        1
// SpecularAccumulation_texture      texture  float4          2d   52        1
// AmbientAccumulation_texture       texture  float4          2d   53        1
// LightDataBuffer                   texture  struct         r/o   54        1
// LightIndexBuffer                  texture   uint4         buf   55        1
// ReflCubeMaps                      texture  float4   cubearray   57        1
// DrawableBuffer                    cbuffer      NA          NA    1        1
// SceneBuffer                       cbuffer      NA          NA    2        1
// MaterialBuffer                    cbuffer      NA          NA    3        1
// InstanceBuffer                    cbuffer      NA          NA    5        1
// IrradianceBuffer                  cbuffer      NA          NA    6        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
// COLOR                    1   xyzw        1     NONE   float   x zw
// TEXCOORD                 0   xyzw        2     NONE   float   xy  
// TEXCOORD                 2   xyz         3     NONE   float   xyz 
// PSIZE                    0   x           4     NONE    uint   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
// SV_TARGET                1   x           1   TARGET   float   x   
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb7[1], immediateIndexed
dcl_constantbuffer cb1[259], dynamicIndexed
dcl_constantbuffer cb2[95], immediateIndexed
dcl_constantbuffer cb3[31], immediateIndexed
dcl_constantbuffer cb5[2043], dynamicIndexed
dcl_constantbuffer cb6[8], immediateIndexed
dcl_sampler s10, mode_default
dcl_sampler s11, mode_default
dcl_sampler s13, 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_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) t9
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (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_resource_texture2d (float,float,float,float) t17
dcl_resource_texture2d (float,float,float,float) t18
dcl_resource_texture2d (float,float,float,float) t19
dcl_resource_texture2d (float,float,float,float) t20
dcl_resource_texture2d (float,float,float,float) t21
dcl_resource_texture2d (float,float,float,float) t22
dcl_resource_texture2d (float,float,float,float) t44
dcl_resource_texture2d (float,float,float,float) t51
dcl_resource_texture2d (float,float,float,float) t52
dcl_resource_texture2d (float,float,float,float) t53
dcl_resource_structured t54, 384 
dcl_resource_buffer (uint,uint,uint,uint) t55
dcl_resource_texturecubearray (float,float,float,float) t57
dcl_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps linear v1.xzw
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xyz
dcl_input_ps constant v4.x
dcl_output o0.xyzw
dcl_output o1.x
// dcl_temps 32
dcl_temps 34
dcl_resource_texture2d (float,float,float,float) t125
dp3 r0.x, v3.xyzx, v3.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v3.xyzx
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) r33.xyzw, l(0, 0, 0, 0), t125.xyzw
add r33.w, v0.w, -r33.y
mul r33.w, r33.w, r33.x
mul r33.w, r33.w, cb2[81].x
add r2.x, r2.x, -r33.w


dp3 r0.w, -r2.xyzx, -r2.xyzx
rsq r0.w, r0.w
mul r3.xyz, r0.wwww, -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
mul r1.zw, v2.xxxy, cb3[22].xxxy
sample_indexable(texture2d)(float,float,float,float) r3.xyzw, r1.zwzz, t5.xyzw, s11
mul r5.xyzw, v2.xyxy, cb3[21].zwxy
sample_indexable(texture2d)(float,float,float,float) r1.zw, r5.xyxx, t7.zwxy, s11
mul r3.xyzw, r3.xyzw, cb3[1].xyzw
mul r0.w, r1.z, cb3[29].y
add r1.z, -cb3[9].w, cb3[29].z
mad r1.z, r1.w, r1.z, cb3[9].w
mul r6.xyz, r0.wwww, cb3[6].xyzx
mov_sat r7.xyz, v1.xzwx
mul r8.xyzw, v2.xyxy, cb3[20].zwxy
sample_indexable(texture2d)(float,float,float,float) r9.xyz, r8.xyxx, t9.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r10.xyz, r1.xyxx, t13.xyzw, s10
sample_indexable(texture2d)(float,float,float,float) r5.xy, v2.xyxx, t14.xzyw, s11
mul r11.xyzw, v2.xyxy, cb3[16].zwxy
sample_indexable(texture2d)(float,float,float,float) r12.xyz, r11.xyxx, t22.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r8.xy, r11.zwzz, t19.xyzw, s11
mul r11.xyzw, v2.xyxy, cb3[17].xyzw
sample_indexable(texture2d)(float,float,float,float) r13.y, r11.xyxx, t21.yxzw, s11
add r0.w, cb3[27].x, -cb3[28].y
mad r0.w, r8.y, r0.w, cb3[28].y
mad r1.w, r5.x, cb3[26].z, cb3[26].w
mul_sat r13.x, r1.w, r7.x
mov r13.z, l(1.000000)
dp3_sat r1.w, cb3[10].xyzx, r13.xyzx
mad r12.xyz, cb3[4].xyzx, r12.xyzx, -r3.xyzx
mad r3.xyz, r1.wwww, r12.xyzx, r3.xyzx
add r0.w, -r1.z, r0.w
mad r0.w, r1.w, r0.w, r1.z
mad r12.xyz, cb3[28].xxxx, r8.xxxx, -r6.xyzx
mad r6.xyz, r1.wwww, r12.xyzx, r6.xyzx
mul r12.xyzw, v2.xyxy, cb3[14].xyzw
sample_indexable(texture2d)(float,float,float,float) r13.xyz, r12.xyxx, t18.xyzw, s11
mul r14.xyzw, v2.xyxy, cb3[15].xyzw
sample_indexable(texture2d)(float,float,float,float) r7.xw, r14.xyxx, t2.xzwy, s11
sample_indexable(texture2d)(float,float,float,float) r12.y, r12.zwzz, t1.yxzw, s11
add r1.z, cb3[24].w, -cb3[26].y
mad r1.z, r7.w, r1.z, cb3[26].y
mad r2.w, r5.y, cb3[26].x, cb3[25].w
mul_sat r12.x, r2.w, r7.y
mov r12.z, l(1.000000)
dp3_sat r2.w, cb3[7].xyzx, r12.xyzx
mad r12.xyz, r13.xyzx, cb3[12].xyzx, -r3.xyzx
mad r3.xyz, r2.wwww, r12.xyzx, r3.xyzx
mad r7.xyw, cb3[25].zzzz, r7.xxxx, -r6.xyxz
mad r6.xyz, r2.wwww, r7.xywx, r6.xyzx
add r1.z, -r0.w, r1.z
mad r0.w, r2.w, r1.z, r0.w
add r1.z, r1.w, r2.w
min r1.z, r1.z, l(1.000000)
add r1.z, -r1.z, l(1.000000)
mul r7.xyw, r1.zzzz, r9.xyxz
sample_indexable(texture2d)(float,float,float,float) r8.xyz, r8.zwzz, t15.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r1.zw, r5.zwzz, t10.zwxy, s11
mul r5.xyz, r8.xyzx, cb3[0].xyzx
mul r1.z, r1.z, cb3[11].w
add r2.w, cb3[12].w, -cb3[24].y
mad r1.w, r1.w, r2.w, cb3[24].y
mad_sat r2.w, r7.x, cb3[29].w, cb3[10].w
mad r5.xyz, r5.xyzx, r3.xyzx, -r3.xyzx
mad r3.xyz, r2.wwww, r5.xyzx, r3.xyzx
add r1.w, -r0.w, r1.w
mad r0.w, r2.w, r1.w, r0.w
mad r5.xyz, cb3[13].xyzx, r1.zzzz, -r6.xyzx
mad r5.xyz, r2.wwww, r5.xyzx, r6.xyzx
mul r1.zw, v2.xxxy, cb3[19].zzzw
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r1.zwzz, t8.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r1.zw, r11.zwzz, t12.zwxy, s11
mul r8.xyzw, v2.xyxy, cb3[23].xyzw
sample_indexable(texture2d)(float,float,float,float) r9.y, r8.xyxx, t6.yxzw, s11
mul r1.z, r1.z, cb3[6].w
add r2.w, cb3[7].w, -cb3[8].w
mad r1.w, r1.w, r2.w, cb3[8].w
mad_sat r9.x, r7.y, cb3[5].w, cb3[4].w
mov r9.z, l(1.000000)
dp3_sat r2.w, cb3[8].xyzx, r9.xyzx
mad r6.xyz, r6.xyzx, cb3[2].xyzx, -r3.xyzx
mad r3.xyz, r2.wwww, r6.xyzx, r3.xyzx
add r1.w, -r0.w, r1.w
mad r0.w, r2.w, r1.w, r0.w
mad r6.xyz, cb3[9].xyzx, r1.zzzz, -r5.xyzx
mad r5.xyz, r2.wwww, r6.xyzx, r5.xyzx
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r8.zwzz, t17.xyzw, s11
mul r1.zw, v2.xxxy, cb3[18].xxxy
sample_indexable(texture2d)(float,float,float,float) r1.zw, r1.zwzz, t20.zwxy, s11
sample_indexable(texture2d)(float,float,float,float) r8.y, r14.zwzz, t4.yxzw, s11
mul r1.z, r1.z, cb3[24].z
add r2.w, -cb3[13].w, cb3[24].x
mad r1.w, r1.w, r2.w, cb3[13].w
mad_sat r8.x, r7.w, cb3[25].y, cb3[25].x
mov r8.z, l(1.000000)
dp3_sat r2.w, cb3[5].xyzx, r8.xyzx
mad r6.xyz, r6.xyzx, cb3[3].xyzx, -r3.xyzx
mad r3.xyz, r2.wwww, r6.xyzx, r3.xyzx
add r1.w, -r0.w, r1.w
mad r0.w, r2.w, r1.w, r0.w
mad r6.xyz, cb3[11].xyzx, r1.zzzz, -r5.xyzx
mad r5.xyz, r2.wwww, r6.xyzx, r5.xyzx
mad r6.xyz, r5.xyzx, cb3[27].zzzz, -r5.xyzx
mad r5.xyz, r7.zzzz, r6.xyzx, r5.xyzx
mad r6.xyz, r3.xyzx, cb3[27].wwww, -r3.xyzx
mad r3.xyz, r7.zzzz, r6.xyzx, r3.xyzx
mad r1.z, r0.w, cb3[27].y, -r0.w
mad r0.w, r7.z, r1.z, r0.w
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r1.xyxx, t51.xyzw, s13
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r1.xyxx, t52.xyzw, s13
max r1.w, r3.w, l(0.000000)
mul r7.xy, v0.xyxx, l(0.250000, 0.250000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r2.w, r7.xyxx, t16.yzwx, s11
mov r3.w, v4.x
mad r2.w, r2.w, cb1[r3.w + 3].y, cb1[r3.w + 3].z
add r3.w, r0.w, l(2.000000)
mul r3.w, r3.w, l(0.010000)
mul r7.xyz, r3.wwww, r5.xyzx
ftoi r8.xy, v0.xyxx
mov r8.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r3.w, r8.xyww, t0.yzwx
add r4.w, cb3[28].w, cb3[28].z
add_sat r4.w, -r4.w, l(1.000000)
mul r5.w, r3.w, r3.w
mad r3.w, cb3[28].z, r3.w, r4.w
mad_sat r3.w, r5.w, cb3[28].w, r3.w
add r9.xyz, -cb2[94].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad_sat r9.xyz, r3.wwww, r9.xyzx, cb2[94].xyzx
mul r1.xyz, r1.xyzx, r9.xyzx
ld_indexable(texture2d)(float,float,float,float) r8.xyz, r8.xyzw, t53.xyzw
add r6.xyz, r6.xyzx, r8.xyzx
mul r6.xyz, r6.xyzx, r9.xyzx
ishl r3.w, v4.x, l(3)
dp3 r4.w, r4.xyzx, r10.xyzx
mul r8.xyz, r10.xyzx, r4.wwww
mad r8.xyz, r8.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r4.xyzx
mul r11.xyzw, r8.yzzz, r8.xxyz
mul r4.w, r8.y, r8.y
mad r8.w, r8.x, r8.x, -r4.w
dp4 r12.x, r11.xyzw, cb6[0].xyzw
dp4 r12.y, r11.xyzw, cb6[2].xyzw
dp4 r12.z, r11.xyzw, cb6[4].xyzw
dp4 r11.x, r8.xyzw, cb6[1].xyzw
dp4 r11.y, r8.xyzw, cb6[3].xyzw
dp4 r11.z, r8.xyzw, cb6[5].xyzw
add r9.yzw, r11.xxyz, r12.xxyz
add r9.yzw, r9.yyzw, cb6[6].xxyz
max r9.yzw, r9.yyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
mad r4.w, r8.z, l(0.500000), l(0.500000)
add r11.xyz, cb2[27].xyzx, -cb2[38].xyzx
mad r11.xyz, r4.wwww, r11.xyzx, cb2[38].xyzx
add r9.yzw, r9.yyzw, r11.xxyz
dp3 r4.w, -r4.xyzx, r10.xyzx
add r4.w, r4.w, r4.w
mad r4.xyz, r10.xyzx, -r4.wwww, -r4.xyzx
mul r11.xyz, r4.yyyy, cb5[r3.w + 1].xyzx
mad r4.xyw, r4.xxxx, cb5[r3.w + 0].xyxz, r11.xyxz
mad r4.xyz, r4.zzzz, cb5[r3.w + 2].xyzx, r4.xywx
div r4.xy, r4.xyxx, r4.zzzz
dp3 r0.x, r8.xyzx, r0.xyzx
mad_sat r0.x, cb3[30].x, r0.x, l(1.000000)
mul r0.x, r0.x, r0.x
mad r0.yz, cb3[19].xxyx, r4.xxyx, cb3[22].zzwz
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r0.yzyy, t3.xyzw, s13
mul r4.xyz, r4.xyzx, cb3[29].xxxx
mul r0.x, r0.x, r9.x
mul r0.x, r0.x, l(0.020000)
ieq r0.y, cb7[0].x, l(0)
ult r0.z, l(1024), cb7[0].x
or r0.y, r0.z, r0.y
if_z r0.y
  dp3 r0.y, r10.xyzx, r8.xyzx
  max r0.y, r0.y, l(0.000100)
  div r0.y, r0.w, r0.y
  mul r0.y, r0.y, l(0.250000)
  log r0.y, r0.y
  mad_sat r0.y, -r0.y, l(0.0909090936), l(1.000000)
  mul r0.y, r0.y, l(4.000000)
  mul r0.z, cb6[7].x, l(3.14159274)
  mul r10.xy, v0.xyxx, l(0.062500, 0.062500, 0.000000, 0.000000)
  round_ni r10.xy, r10.xyxx
  utof r0.w, cb7[0].z
  mad r0.w, r10.y, r0.w, r10.x
  ftou r0.w, r0.w
  imul null, r3.w, cb7[0].w, cb7[0].z
  ishl r3.w, r3.w, l(1)
  ishl r0.w, r0.w, l(1)
  iadd r0.w, r0.w, r3.w
  mov r10.xyz, r8.xyzx
  mov r11.w, l(1.000000)
  mov r12.w, l(1.000000)
  mov r13.xyz, l(0,0,0,0)
  mov r14.xyz, l(0,0,0,0)
  mov r15.xy, l(0,0,0,0)
  mov r3.w, l(0)
  mov r4.w, l(0)
  mov r5.w, l(1.000000)
  mov r6.w, l(0)
  loop 
    uge r7.w, r6.w, l(2)
    breakc_nz r7.w
    iadd r7.w, r0.w, r6.w
    ld_indexable(buffer)(uint,uint,uint,uint) r16.xyzw, r7.wwww, t55.xyzw
    ushr r17.xyzw, r16.xyzw, l(30, 30, 30, 30)
    iadd r7.w, r17.y, r17.x
    iadd r7.w, r17.z, r7.w
    iadd r7.w, r17.w, r7.w
    mov r17.xyz, r13.xyzx
    mov r18.xyz, r14.xyzx
    mov r19.xw, r15.yyyx
    mov r19.y, r3.w
    mov r19.z, r4.w
    mov r9.x, r5.w
    mov r13.w, l(0)
    loop 
      uge r14.w, r13.w, r7.w
      breakc_nz r14.w
      ult r20.xyz, r13.wwww, l(3, 6, 9, 0)
      iadd r21.xyz, r13.wwww, l(-3, -6, -9, 0)
      movc r14.w, r20.z, r21.y, r21.z
      movc r14.w, r20.y, r21.x, r14.w
      movc r14.w, r20.x, r13.w, r14.w
      movc r15.z, r20.z, r16.z, r16.w
      movc r15.z, r20.y, r16.y, r15.z
      movc r15.z, r20.x, r16.x, r15.z
      imul null, r14.w, r14.w, l(10)
      ushr r14.w, r15.z, r14.w
      and r14.w, r14.w, l(1023)
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.z, r14.w, l(140), t54.xxxx
      mov r20.xyz, r17.xyzx
      mov r21.xyz, r18.xyzx
      mov r22.xyzw, r19.xyzw
      mov r15.w, r9.x
      mov r23.x, r13.w
      mov r23.y, r14.w
      mov r23.z, r15.z
      loop 
        ult r23.w, r23.x, r7.w
        ieq r24.xy, r23.zzzz, l(0, 1, 0, 0)
        or r24.x, r24.y, r24.x
        and r23.w, r23.w, r24.x
        breakc_z r23.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyzw, r23.y, l(0), t54.xyzw
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xzw, r23.y, l(16), t54.xxyz
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.w, r23.y, l(32), t54.xxxx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.yz, r23.y, l(40), t54.xxyx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r27.xyzw, r23.y, l(60), t54.xyzw
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r28.xy, r23.y, l(100), t54.xyxx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.w, r23.y, l(332), t54.xxxx
        and r26.w, r26.w, l(3)
        add r25.xyz, r2.xyzx, -r25.xyzx
        dp3 r28.z, r25.xyzx, r24.xzwx
        max r28.z, r28.z, l(0.000000)
        min r25.w, r25.w, r28.z
        mad r24.xzw, -r25.wwww, r24.xxzw, r25.xxyz
        movc r24.xyz, r24.yyyy, r24.xzwx, r25.xyzx
        dp3 r24.x, r24.xyzx, r24.xyzx
        sqrt r24.x, r24.x
        mad_sat r26.x, r24.x, r23.w, r26.y
        sample_l_indexable(texture2d)(float,float,float,float) r23.w, r26.xzxx, t44.xywz, s13, l(0.000000)
        ine r24.x, r28.y, l(1)
        movc r23.w, r24.x, l(0), r23.w
        ine r24.x, r26.w, l(2)
        if_nz r24.x
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.x, r23.y, l(372), t54.xxxx
          mul r24.y, r23.w, r23.w
          mul r24.x, r24.x, r24.y
          ieq r24.yz, r26.wwww, l(0, 1, 3, 0)
          mul r24.w, r0.z, r27.x
          itof r10.w, r28.x
          sample_l_indexable(texturecubearray)(float,float,float,float) r25.xyz, r10.xyzw, t57.xyzw, s11, r0.y
          mul r25.xyz, r24.wwww, r25.xyzx
          mul r11.xyz, r27.yzwy, r25.xyzx
          mov r21.w, r22.z
          mad r25.xyzw, r24.xxxx, r11.wxyz, r21.wxyz
          max r26.w, r22.w, r24.x
          mov r20.w, r22.x
          mad r28.xyzw, r24.xxxx, r11.xyzw, r20.xyzw
          max r29.x, r22.y, r24.x
          mov r26.x, r20.w
          mov r26.z, r25.x
          mov r22.x, r28.w
          mov r22.z, r21.w
          movc r30.xzw, r24.yyyy, r26.xxzw, r22.xxzw
          mov r25.x, r22.y
          mov r29.yzw, r21.xxyz
          movc r29.xyzw, r24.yyyy, r25.xyzw, r29.xyzw
          or r10.w, r24.z, r24.y
          movc r20.xyz, r10.wwww, r20.xyzx, r28.xyzx
          movc r21.xyz, r24.zzzz, r21.xyzx, r29.yzwy
          mov r22.x, r26.x
          mov r22.y, r25.x
          mov r30.y, r29.x
          movc r22.xyzw, r24.zzzz, r22.xyzw, r30.xyzw
        else 
          add_sat r10.w, -r23.w, l(1.000000)
          mul r10.w, r10.w, r10.w
          add r11.x, -r27.x, l(1.000000)
          mad r10.w, r10.w, r11.x, r27.x
          mul r15.w, r10.w, r15.w
        endif 
        iadd r10.w, r23.x, l(1)
        ult r11.x, r10.w, r7.w
        if_nz r11.x
          ult r11.xyz, r10.wwww, l(3, 6, 9, 0)
          iadd r24.xyz, r23.xxxx, l(-2, -5, -8, 0)
          movc r20.w, r11.z, r24.y, r24.z
          movc r20.w, r11.y, r24.x, r20.w
          movc r20.w, r11.x, r10.w, r20.w
          movc r11.z, r11.z, r16.z, r16.w
          movc r11.y, r11.y, r16.y, r11.z
          movc r11.x, r11.x, r16.x, r11.y
          imul null, r11.y, r20.w, l(10)
          ushr r11.x, r11.x, r11.y
          and r23.y, r11.x, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.z, r23.y, l(140), t54.xxxx
        endif 
        mov r23.x, r10.w
      endloop 
      mov r17.xyz, r20.xyzx
      mov r18.xyz, r21.xyzx
      mov r19.xyzw, r22.xyzw
      mov r9.x, r15.w
      mov r10.w, r23.x
      mov r11.xy, r23.yzyy
      loop 
        ult r11.z, r10.w, r7.w
        ieq r14.w, r11.y, l(4)
        and r11.z, r11.z, r14.w
        breakc_z r11.z
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xyz, r11.x, l(0), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyz, r11.x, l(16), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.y, r11.x, l(44), t54.xxxx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r27.xyzw, r11.x, l(60), t54.xyzw
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.zw, r11.x, l(100), t54.xxxy
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r28.xyz, r11.x, l(128), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r29.xyz, r11.x, l(144), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r30.xyz, r11.x, l(160), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r31.xyz, r11.x, l(176), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r11.z, r11.x, l(332), t54.xxxx
        and r11.z, r11.z, l(3)
        add r24.xyz, r2.xyzx, -r24.xyzx
        dp3 r28.y, r24.xyzx, r28.xyzx
        dp3 r28.z, r24.xyzx, r25.xyzx
        dp3 r28.w, r24.xyzx, r29.xyzx
        mul r24.xyz, r30.xyzx, r31.xyzx
        mad r25.xyz, r31.xyzx, r30.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        div r25.xyz, r31.xyzx, r25.xyzx
        mul r25.xyz, r25.xyzx, r28.yzwy
        max r25.xyz, r25.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
        min r25.xyz, r25.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mul r28.yzw, r25.xxyz, r25.xxyz
        mad r14.w, -r25.x, r25.x, l(1.000000)
        mad r14.w, r28.w, r14.w, r28.y
        add r15.z, -r14.w, l(1.000000)
        mad_sat r14.w, r28.z, r15.z, r14.w
        sqrt r14.w, r14.w
        max r28.x, r28.y, l(0.000010)
        dp3 r15.z, r24.xyzx, r28.xzwx
        mad r20.w, r25.y, r25.y, r28.x
        mad r20.w, r25.z, r25.z, r20.w
        div r15.z, r15.z, r20.w
        add r20.w, r15.z, l(1.000000)
        mad_sat r26.x, r14.w, r20.w, -r15.z
        sample_l_indexable(texture2d)(float,float,float,float) r14.w, r26.xyxx, t44.xywz, s13, l(0.000000)
        ine r15.z, r26.w, l(1)
        movc r14.w, r15.z, l(0), r14.w
        ine r15.z, r11.z, l(2)
        if_nz r15.z
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.z, r11.x, l(372), t54.xxxx
          mul r20.w, r14.w, r14.w
          mul r15.z, r15.z, r20.w
          ieq r24.xy, r11.zzzz, l(1, 3, 0, 0)
          mul r11.z, r0.z, r27.x
          itof r8.w, r26.z
          sample_l_indexable(texturecubearray)(float,float,float,float) r25.xyz, r8.xyzw, t57.xyzw, s11, r0.y
          mul r25.xyz, r11.zzzz, r25.xyzx
          mul r12.xyz, r27.yzwy, r25.xyzx
          mov r18.w, r19.z
          mad r25.xyzw, r15.zzzz, r12.wxyz, r18.wxyz
          max r26.w, r15.z, r19.w
          mov r17.w, r19.x
          mad r28.xyzw, r15.zzzz, r12.xyzw, r17.xyzw
          max r29.x, r15.z, r19.y
          mov r26.x, r17.w
          mov r26.z, r25.x
          mov r19.x, r28.w
          mov r19.z, r18.w
          movc r30.xzw, r24.xxxx, r26.xxzw, r19.xxzw
          mov r25.x, r19.y
          mov r29.yzw, r18.xxyz
          movc r29.xyzw, r24.xxxx, r25.xyzw, r29.xyzw
          or r8.w, r24.y, r24.x
          movc r17.xyz, r8.wwww, r17.xyzx, r28.xyzx
          movc r18.xyz, r24.yyyy, r18.xyzx, r29.yzwy
          mov r19.x, r26.x
          mov r19.y, r25.x
          mov r30.y, r29.x
          movc r19.xyzw, r24.yyyy, r19.xyzw, r30.xyzw
        else 
          add_sat r8.w, -r14.w, l(1.000000)
          mul r8.w, r8.w, r8.w
          add r11.z, -r27.x, l(1.000000)
          mad r8.w, r8.w, r11.z, r27.x
          mul r9.x, r8.w, r9.x
        endif 
        iadd r8.w, r10.w, l(1)
        ult r11.z, r8.w, r7.w
        if_nz r11.z
          ult r12.xyz, r8.wwww, l(3, 6, 9, 0)
          iadd r24.xyz, r10.wwww, l(-2, -5, -8, 0)
          movc r11.z, r12.z, r24.y, r24.z
          movc r11.z, r12.y, r24.x, r11.z
          movc r11.z, r12.x, r8.w, r11.z
          movc r12.z, r12.z, r16.z, r16.w
          movc r12.y, r12.y, r16.y, r12.z
          movc r12.x, r12.x, r16.x, r12.y
          imul null, r11.z, r11.z, l(10)
          ushr r11.z, r12.x, r11.z
          and r11.x, r11.z, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r11.y, r11.x, l(140), t54.xxxx
        endif 
        mov r10.w, r8.w
      endloop 
      ine r12.xyz, r11.yyyy, l(0, 4, 1, 0)
      and r8.w, r12.y, r12.x
      and r8.w, r12.z, r8.w
      iadd r13.w, -r8.w, r10.w
    endloop 
    ult r7.w, r7.w, l(12)
    if_nz r7.w
      mov r13.xyz, r17.xyzx
      mov r14.xyz, r18.xyzx
      mov r15.xy, r19.wxww
      mov r3.w, r19.y
      mov r4.w, r19.z
      mov r5.w, r9.x
      break 
    endif 
    iadd r6.w, r6.w, l(1)
    mov r13.xyz, r17.xyzx
    mov r14.xyz, r18.xyzx
    mov r15.xy, r19.wxww
    mov r3.w, r19.y
    mov r4.w, r19.z
    mov r5.w, r9.x
  endloop 
  max r0.y, r4.w, l(1.192092896E-007)
  div r0.yzw, r14.xxyz, r0.yyyy
  mov_sat r15.x, r15.x
  add r0.yzw, -r9.yyzw, r0.yyzw
  mad r0.yzw, r15.xxxx, r0.yyzw, r9.yyzw
  max r2.x, r15.y, l(1.192092896E-007)
  div r2.xyz, r13.xyzx, r2.xxxx
  mov_sat r3.w, r3.w
  add r2.xyz, -r0.yzwy, r2.xyzx
  mad r9.yzw, r3.wwww, r2.xxyz, r0.yyzw
else 
  mov r5.w, l(1.000000)
endif 
mul r0.yzw, r5.wwww, r9.yyzw
mul r0.yzw, r5.xxyz, r0.yyzw
mad r1.xyz, r1.xyzx, r7.xyzx, r4.xyzx
mad r0.xyz, r0.yzwy, r0.xxxx, r1.xyzx
mad r0.xyz, r6.xyzx, r3.xyzx, r0.xyzx
max o0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
add r0.x, r1.w, -cb1[2].x
min r0.x, r2.w, r0.x
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mov o0.w, r1.w
mov o1.x, l(0)
ret 
// Approximately 482 instruction slots used
