//b60e92f361230275-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Sun Feb 14 00:45:00 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 [unused]
//   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 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
//   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
//   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 [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
//
// }
//
// 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 [unused]
//
// }
//
// 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_n237_n292_661830C016465534_cp0_Param_texture    texture  float4          2d    0        1
// p_default_Setup_n6_9075B4F026705685_cp2_Param_texture    texture  float4          2d    1        1
// p_default_Setup_n6_n79_Texture_texture    texture  float4          2d    2        1
// p_default_Setup_F10FEF204491676_cp0_Param_texture    texture  float4          2d    3        1
// p_default_Setup_n37_NormalBufferTexture_texture    texture  float4          2d    4        1
// p_default_Setup_n10_n82_Texture_texture    texture  float4          2d    5        1
// p_default_Setup_n6_8B09DC7019763283_cp1_Param_texture    texture  float4          2d    6        1
// p_default_Setup_n10_n159_Texture_texture    texture  float4          2d    7        1
// p_default_Setup_n6_n82_Texture_texture    texture  float4          2d    8        1
// p_default_Setup_n10_n92_Texture_texture    texture  float4          2d    9        1
// p_default_Setup_n10_B217A49024294212_Param_texture    texture  float4        cube   10        1
// p_default_Material_5D538DD03205705_Param_texture    texture  float4          2d   11        1
// p_default_Setup_n10_n79_Texture_texture    texture  float4          2d   12        1
// p_default_Setup_8CD6AD409878073_cp6_Param_texture    texture  float4          2d   13        1
// p_default_Setup_n10_1BB3530022408697_cp0_Param_texture    texture  float4          2d   14        1
// LightAccumulation_texture         texture  float4          2d   51        1
// LightDataBuffer                   texture  struct         r/o   54        1
// SceneBuffer                       cbuffer      NA          NA    2        1
// MaterialBuffer                    cbuffer      NA          NA    3        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                    0   xyzw        1     NONE   float   xyz 
// TEXCOORD                 0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyz         3     NONE   float   xyz 
//
//
// 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 cb2[46], immediateIndexed
dcl_constantbuffer cb2[82], immediateIndexed
dcl_constantbuffer cb3[25], immediateIndexed
dcl_constantbuffer cb6[7], 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_texturecube (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t11
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) t51
dcl_resource_structured t54, 384 
dcl_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps linear v1.xyz
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xyz
dcl_output o0.xyzw
// dcl_temps 10
dcl_temps 12
dcl_resource_texture2d (float,float,float,float) t125
deriv_rty_fine r0.xy, v2.xyxx
deriv_rtx_fine r1.xy, v2.xyxx
mul r0.x, r0.x, r1.y
mad r0.x, r1.x, r0.y, -r0.x
mov r0.z, -r1.y
lt r0.w, r0.x, l(0.000000)
lt r0.x, l(0.000000), |r0.x|
movc r0.w, r0.w, l(-1.000000), l(1.000000)
mul r0.yz, r0.yyzy, r0.wwww
mov r1.z, v0.w
mov r1.w, l(1.000000)
mad r2.xy, v0.xyxx, cb2[45].zwzz, cb2[45].xyxx
mul r1.xy, r2.xyxx, v0.wwww

//Screen space correction, therefore need the '0.5'
ld_indexable(texture2d)(float,float,float,float) r11.xyzw, l(0, 0, 0, 0), t125.xyzw
add r11.w, v0.w, -r11.y
mul r11.w, r11.w, r11.x
mul r11.w, r11.w, l(0.5)
add r1.x, r1.x, -r11.w


dp4 r2.z, cb2[15].xyzw, r1.xyzw
deriv_rty_fine r3.x, r2.z
deriv_rtx_fine r4.z, r2.z
dp4 r2.z, cb2[16].xyzw, r1.xyzw
dp4 r1.x, cb2[17].xyzw, r1.xyzw
deriv_rty_fine r3.y, r2.z
deriv_rtx_fine r4.x, r2.z
deriv_rty_fine r3.z, r1.x
deriv_rtx_fine r4.y, r1.x
dp3 r1.x, v3.xyzx, v3.xyzx
rsq r1.x, r1.x
mul r5.xyz, r1.xxxx, v3.xyzx
mad r5.w, -v3.z, r1.x, l(1.000000)
dp3 r1.x, r3.xyzx, r5.xyzx
mad r1.xyz, -r1.xxxx, r5.xyzx, r3.xyzx
mul r3.xyz, r0.zzzz, r1.xyzx
dp3 r0.z, r4.zxyz, r5.xyzx
mad r4.xyz, -r0.zzzz, r5.yzxy, r4.xyzx
mad r3.xyz, r4.zxyz, r0.yyyy, r3.xyzx
dp3 r0.y, r3.xyzx, r3.xyzx
rsq r0.y, r0.y
mul r6.xyz, r0.yyyy, r3.xyzx
movc r0.xyz, r0.xxxx, r6.xyzx, r3.xyzx
mul r3.xyz, r0.yzxy, r5.zxyz
mad r3.xyz, r5.yzxy, r0.zxyz, -r3.xyzx
mul r6.xyz, r4.xyzx, r5.zxyz
mad r4.xyz, r5.yzxy, r4.yzxy, -r6.xyzx
dp3 r1.x, r1.xyzx, r4.xyzx
lt r1.x, r1.x, l(0.000000)
movc r1.x, r1.x, l(-1.000000), l(1.000000)
mul r0.w, r0.w, r1.x
mul r1.xyz, r0.wwww, r3.xyzx
sample_indexable(texture2d)(float,float,float,float) r2.zw, v2.xyxx, t3.zwxy, s11
mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r3.xyz, r1.xyzx, r2.wwww
mad r3.xyz, r2.zzzz, r0.xyzx, r3.xyzx
dp2 r0.w, r2.zwzz, r2.zwzz
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, l(0.000000)
sqrt r0.w, r0.w
mad r3.xyz, r0.wwww, r5.xyzx, r3.xyzx
dp3 r0.w, r3.xyzx, r3.xyzx
rsq r0.w, r0.w
mul r0.w, r0.w, r3.z
mad_sat r0.w, r0.w, l(0.500000), l(0.500000)
mul r3.xyzw, v2.xyxy, cb3[21].xyzw
sample_indexable(texture2d)(float,float,float,float) r2.zw, r3.xyxx, t13.yzxw, s11
sample_indexable(texture2d)(float,float,float,float) r3.xy, r3.zwzz, t5.xyzw, s11
mul r0.w, r0.w, r2.w
mad_sat r1.w, r2.z, cb3[9].w, cb3[23].y
mad_sat r4.x, r0.w, cb3[24].w, cb3[4].w
mul r2.zw, v2.xxxy, cb3[19].zzzw
sample_indexable(texture2d)(float,float,float,float) r4.y, r2.zwzz, t1.yxzw, s11
mov r4.z, l(1.000000)
dp3_sat r0.w, cb3[11].xyzx, r4.xyzx
mul r4.xyzw, v2.xyxy, cb3[18].xyzw
sample_indexable(texture2d)(float,float,float,float) r2.zw, r4.xyxx, t14.zwxy, s11
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r4.zwzz, t12.xyzw, s11
mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r3.z, -r2.z, r2.z, l(1.000000)
mad r3.z, -r2.w, r2.w, r3.z
mul r6.xy, r2.zwzz, r2.zwzz
max r3.w, r6.y, r6.x
mul r3.w, r3.w, l(0.0000610351563)
max r3.z, r3.w, r3.z
rsq r3.z, r3.z
mul r2.zw, r2.zzzw, -r3.zzzz
mul r2.zw, r2.zzzw, cb3[23].zzzz
mul r2.zw, r1.wwww, r2.zzzw
mul r1.xyz, r1.xyzx, r2.wwww
mad r0.xyz, r2.zzzz, r0.xyzx, r1.xyzx
add r1.x, -cb3[22].z, l(1.000000)
mul r1.xyz, r5.xywx, r1.xxxx
mad r2.zw, r2.xxxy, cb2[18].xxxy, cb2[18].zzzw
mul r6.xy, r2.zwzz, v0.wwww
mov r6.z, v0.w

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


dp3 r2.z, -r6.xyzx, -r6.xyzx
rsq r2.z, r2.z
mul r6.xyz, r2.zzzz, -r6.xyzx
dp3 r7.z, r6.xyzx, cb2[2].xyzx
add r7.w, -r7.z, l(1.000000)
dp3 r7.x, r6.xyzx, cb2[0].xyzx
dp3 r7.y, r6.xyzx, cb2[1].xyzx
mad r6.xyz, cb3[22].zzzz, r7.xywx, r1.xyzx
add r6.w, -r6.z, l(1.000000)
dp3 r1.x, r6.xywx, r6.xywx
rsq r1.x, r1.x
mad r0.xyz, r6.xywx, r1.xxxx, -r0.xyzx
mul r1.xyz, r1.xxxx, r6.xywx
dp3 r2.z, r0.xyzx, r0.xyzx
rsq r2.z, r2.z
mad r0.xyz, r0.xyzx, r2.zzzz, -r1.xyzx
mad r0.xyz, cb3[15].wwww, r0.xyzx, r1.xyzx
dp3 r1.x, -r7.xyzx, r0.xyzx
mad r1.y, -r1.x, r1.x, l(1.000000)
mad r1.y, -r1.y, l(1.71609986), l(1.000000)
sqrt r1.z, r1.y
ge r1.y, r1.y, l(0.000000)
mad r1.x, r1.x, l(1.310000), r1.z
mul r6.xyz, r0.xyzx, r1.xxxx
mad r6.xyz, r7.xyzx, l(-1.310000, -1.310000, -1.310000, 0.000000), -r6.xyzx
and r1.xyz, r1.yyyy, r6.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r1.xyz, r1.xyzx, t10.xyzw, s11, l(0.000000)
dp3 r2.z, r0.xyzx, r7.xyzx
mul r0.xyz, r0.xyzx, r2.zzzz
max r2.z, r2.z, l(1.000000012E-007)
mad r2.z, -r2.z, r2.z, l(1.000000)
mad_sat r2.z, -r2.z, l(2.250000), l(1.000000)
mad r0.xyz, r0.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r7.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r0.xyz, r0.xyzx, t10.xyzw, s11, l(0.000000)
add r1.xyz, -r0.xyzx, r1.xyzx
mad r0.xyz, r2.zzzz, r1.xyzx, r0.xyzx
max r0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
log r0.xyz, r0.xyzx
div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), cb3[8].w
mul r0.xyz, r0.xyzx, r1.xxxx
exp r0.xyz, r0.xyzx
add r1.xyz, -cb3[3].xyzx, cb3[4].xyzx
mul r6.xyzw, v2.xyxy, cb3[16].zwxy
sample_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t7.yzxw, s11
sample_indexable(texture2d)(float,float,float,float) r2.w, r6.zwzz, t8.yzwx, s11
mad r1.xyz, r2.zzzz, r1.xyzx, cb3[3].xyzx
mul r0.xyz, r0.xyzx, r1.xyzx
mad r1.xyz, r4.xyzx, cb3[0].xyzx, -r0.xyzx
dp3 r2.z, r5.xyzx, r7.xyzx
mul r3.zw, r5.xxxy, r2.zzzz
add_sat r2.z, -r2.z, l(1.000000)
log r2.z, r2.z
mul r2.z, r2.z, cb3[12].w
exp r2.z, r2.z
mad r0.xyz, r2.zzzz, r1.xyzx, r0.xyzx
add r0.xyz, r0.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r0.xyz, r1.wwww, r0.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r1.xy, r3.zwzz, l(2.000000, 2.000000, 0.000000, 0.000000), -r7.xyxx
mul r1.xy, r1.xyxx, cb3[6].wwww
sample_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t6.yxzw, s11
mul r4.xyzw, v2.zwxy, cb3[17].zwxy
sample_indexable(texture2d)(float,float,float,float) r5.xyz, r4.zwzz, t2.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r1.y, r4.xyxx, t9.yxzw, s11
mul r1.y, r1.y, r1.w
mad r4.xyz, r5.xyzx, cb3[2].xyzx, -r0.xyzx
mad r0.xyz, r0.wwww, r4.xyzx, r0.xyzx
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r2.xyxx, t4.xyzw, s10
sample_indexable(texture2d)(float,float,float,float) r2.xyz, r2.xyxx, t51.xyzw, s13
dp3_sat r1.z, r7.xyzx, r4.xyzx
add r3.z, -r1.z, l(1.000000)
log r3.z, r3.z
mul r3.z, r3.z, cb3[11].w
exp r3.z, r3.z
mul r5.xyz, r3.zzzz, cb3[6].xyzx
mad r3.z, -r1.z, cb3[10].w, l(1.000000)
dp3_sat r3.w, cb3[5].xyzx, r4.xyzx
mad r5.xyz, r3.wwww, r5.xyzx, r3.zzzz
add r5.xyz, r5.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r5.xyz, r1.wwww, r5.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r0.xyz, r0.xyzx, r5.xyzx
ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r5.xyz, cb7[0].x, l(16), t54.xyzx
dp3 r6.x, -r5.xyzx, cb2[0].xyzx
dp3 r6.y, -r5.xyzx, cb2[1].xyzx
dp3 r6.z, -r5.xyzx, cb2[2].xyzx
movc r5.xyz, cb7[0].yyyy, -r6.xyzx, l(-0.000000,-0.000000,-0.000000,0)
add r6.xyz, r5.xyzx, r7.xyzx
dp3_sat r3.z, r5.xyzx, r4.xyzx
dp3 r3.w, r6.xyzx, r6.xyzx
rsq r3.w, r3.w
mul r5.xyz, r3.wwww, r6.xyzx
dp3_sat r3.w, r7.xyzx, r5.xyzx
dp3_sat r5.x, r5.xyzx, r4.xyzx
dp3 r5.y, -r7.xyzx, cb3[5].xyzx
add r5.y, r5.y, cb3[22].x
max r3.w, r3.w, l(1.192092896E-007)
min r5.z, r1.z, r3.z
div r3.z, r3.z, r1.z
eq r5.w, r1.z, r5.z
div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r1.z
movc r3.z, r5.w, l(1.000000), r3.z
add r5.w, r5.x, r5.x
log r5.x, r5.x
mul r3.z, r3.z, r5.w
mul r5.z, r5.w, r5.z
ge r5.z, r3.w, r5.z
div r3.z, r3.z, r3.w
movc r1.z, r5.z, r3.z, r1.z
mul r6.xyzw, v2.xyzw, cb3[20].zwxy
sample_indexable(texture2d)(float,float,float,float) r3.z, r6.xyxx, t6.yzxw, s11
mad r5.zw, cb2[24].xxxx, cb3[19].xxxy, r6.zzzw
sample_indexable(texture2d)(float,float,float,float) r6.xyzw, r5.zwzz, t11.xyzw, s11
mul r6.xyzw, r6.xyzw, cb3[1].xyzw
mul r3.z, r3.z, cb3[5].w
mul_sat r1.x, r1.x, r3.z
add r3.z, cb3[3].w, -cb3[7].w
mad r3.z, r1.x, r3.z, cb3[7].w
add r3.w, -cb3[24].z, cb3[24].x
mad r3.y, r3.y, r3.w, cb3[24].z
mad r7.xyz, cb3[10].xyzx, r3.xxxx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r7.xyz, r1.wwww, r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r3.x, r3.y, l(-1.000000)
mad r3.x, r1.w, r3.x, l(1.000000)
add r3.y, -r3.x, r3.z
mad r3.x, r0.w, r3.y, r3.x
mul r3.y, r5.x, r3.x
add r3.x, r3.x, l(2.000000)
mul r3.x, r3.x, l(0.010000)
exp r3.y, r3.y
mul r1.z, r1.z, r3.y
dp3 r3.y, v1.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
mul r1.z, r1.z, r3.y
mul r1.z, r1.z, cb3[23].w
add r3.y, cb3[22].w, cb3[23].x
add_sat r3.y, -r3.y, l(1.000000)
ftoi r8.xy, v0.xyxx
mov r8.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r3.z, r8.xyzw, t0.yzxw
mad r3.y, cb3[22].w, r3.z, r3.y
mul r3.z, r3.z, r3.z
mad_sat r3.y, r3.z, cb3[23].x, r3.y
add r5.xzw, -cb3[12].xxyz, l(1.000000, 0.000000, 1.000000, 1.000000)
mad_sat r3.yzw, r3.yyyy, r5.xxzw, cb3[12].xxyz
mul r5.xzw, r1.zzzz, r3.yyzw
mul r8.xyz, r2.wwww, cb3[9].xyzx
mad r9.xyz, -cb3[9].xyzx, r2.wwww, cb3[15].xyzx
mad r8.xyz, r1.xxxx, r9.xyzx, r8.xyzx
add r8.xyz, -r7.xyzx, r8.xyzx
mad r7.xyz, r0.wwww, r8.xyzx, r7.xyzx
mul r7.xyz, r3.xxxx, r7.xyzx
mul r5.xzw, r5.xxzw, r7.xxyz
mul r1.x, r4.y, r4.y
mad r4.w, r4.x, r4.x, -r1.x
dp4 r7.x, r4.xyzw, cb6[1].xyzw
dp4 r7.y, r4.xyzw, cb6[3].xyzw
dp4 r7.z, r4.xyzw, cb6[5].xyzw
mul r8.xyzw, r4.yzzz, r4.xxyz
mad r1.x, r4.z, l(0.500000), l(0.500000)
mad r4.xyz, r1.xxxx, -cb2[38].xyzx, cb2[38].xyzx
dp4 r9.x, r8.xyzw, cb6[0].xyzw
dp4 r9.y, r8.xyzw, cb6[2].xyzw
dp4 r9.z, r8.xyzw, cb6[4].xyzw
add r7.xyz, r7.xyzx, r9.xyzx
add r7.xyz, r7.xyzx, cb6[6].xyzx
max r7.xyz, r7.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
add r4.xyz, r4.xyzx, r7.xyzx
mul r7.xyz, r1.wwww, cb3[14].xyzx
mad r8.xyz, -r1.wwww, cb3[14].xyzx, cb3[13].xyzx
mad r7.xyz, r0.wwww, r8.xyzx, r7.xyzx
add r0.w, cb3[22].x, l(1.000000)
div r0.w, r5.y, r0.w
max r0.w, r0.w, l(0.000000)
mul r0.w, r1.y, r0.w
mul r0.w, r0.w, r1.w
mul r1.x, r1.w, r6.w
mad r1.yzw, v1.xxyz, cb3[7].xxyz, r0.wwww
add r1.yzw, r1.yyzw, r2.xxyz
add r1.yzw, r7.xxyz, r1.yyzw
add r1.yzw, r1.yyzw, r4.xxyz
mul r1.yzw, r1.yyzw, r3.yyzw
mad r0.xyz, r1.yzwy, r0.xyzx, r5.xzwx
mad r0.xyz, r6.xyzx, r1.xxxx, r0.xyzx
max o0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mov o0.w, l(1.000000)
ret 
// Approximately 273 instruction slots used
