//743a499d9ae21d44-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Sat Feb 13 21:21:59 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 [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 [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
//
// }
//
// 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_n262_n324_661830C016465534_cp0_Param_texture    texture  float4          2d    0        1
// p_default_Setup_8CD6AD409878073_cp6_Param_texture    texture  float4          2d    1        1
// p_default_Setup_n6_n94_Texture_texture    texture  float4          2d    2        1
// p_default_Setup_n5_n94_Texture_texture    texture  float4          2d    3        1
// p_default_Setup_n5_8B09DF1018700059_cp0_Param_texture    texture  float4          2d    4        1
// p_default_Setup_n32_NormalBufferTexture_texture    texture  float4          2d    5        1
// p_default_Setup_n9_n196_Texture_texture    texture  float4          2d    7        1
// p_default_Setup_n9_n94_Texture_texture    texture  float4          2d    8        1
// p_default_Setup_n9_n210_Texture_texture    texture  float4          2d    9        1
// p_default_Setup_n9_n98_Texture_texture    texture  float4          2d   10        1
// p_default_Setup_n9_n211_Texture_texture    texture  float4          2d   11        1
// p_default_Setup_n9_9B7F2E9016830540_cp10_Param_texture    texture  float4          2d   12        1
// p_default_Setup_n9_1BB3530022408697_cp0_Param_texture    texture  float4          2d   13        1
// p_default_Setup_n9_9075B4F026705685_cp2_Param_texture    texture  float4          2d   14        1
// p_default_Setup_n17_n196_Texture_texture    texture  float4          2d   16        1
// p_default_Setup_n17_n94_Texture_texture    texture  float4          2d   17        1
// p_default_Setup_n17_n210_Texture_texture    texture  float4          2d   18        1
// p_default_Setup_n3_n98_Texture_texture    texture  float4          2d   19        1
// p_default_Setup_n17_n98_Texture_texture    texture  float4          2d   20        1
// p_default_Setup_n3_n94_Texture_texture    texture  float4          2d   21        1
// p_default_Setup_n17_n211_Texture_texture    texture  float4          2d   22        1
// p_default_Setup_n17_9B7F2E9016830540_cp10_Param_texture    texture  float4          2d   23        1
// p_default_Setup_n17_1BB3530022408697_cp0_Param_texture    texture  float4          2d   24        1
// p_default_Setup_n17_8B09DC7019763283_cp1_Param_texture    texture  float4          2d   25        1
// p_default_Setup_n17_8B09DF1018700059_cp0_Param_texture    texture  float4          2d   26        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
// 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
// COLOR                    0   xyzw        1     NONE   float   x   
// TEXCOORD                 0   xyzw        2     NONE   float   xy  
// TEXCOORD                 2   xyz         3     NONE   float   xyz 
// PSIZE                    0   x           4     NONE    uint       
//
//
// 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 cb2[46], immediateIndexed
dcl_constantbuffer cb2[82], immediateIndexed
dcl_constantbuffer cb3[47], 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) 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) 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) 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) t23
dcl_resource_texture2d (float,float,float,float) t24
dcl_resource_texture2d (float,float,float,float) t25
dcl_resource_texture2d (float,float,float,float) t26
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_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps linear v1.x
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xyz
dcl_output o0.xyzw
dcl_output o1.x
// dcl_temps 12
dcl_temps 14
dcl_resource_texture2d (float,float,float,float) t125
mul r0.xy, cb2[24].xxxx, cb3[29].zwzz
mad r0.xy, v2.xyxx, cb3[32].xyxx, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.z, v2.xyxx, t26.yzxw, s11
add r0.z, r0.z, l(-0.500000)
mul r0.z, r0.z, cb3[23].w
deriv_rtx_fine r1.xy, v2.xyxx
deriv_rty_fine r1.zw, v2.xxxy
mov r2.z, v0.w
mov r2.w, l(1.000000)
mad r3.xy, v0.xyxx, cb2[45].zwzz, cb2[45].xyxx
mul r2.xy, r3.xyxx, v0.wwww

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


dp4 r4.x, cb2[15].xyzw, r2.xyzw
dp4 r4.y, cb2[16].xyzw, r2.xyzw
dp4 r4.z, cb2[17].xyzw, r2.xyzw
deriv_rty_fine r2.xyz, r4.zxyz
dp3 r0.w, v3.xyzx, v3.xyzx
rsq r0.w, r0.w
mul r5.xyz, r0.wwww, v3.xyzx
mul r6.xyz, r2.xyzx, r5.yzxy
mad r2.xyz, r2.zxyz, r5.zxyz, -r6.xyzx
deriv_rtx_fine r6.xyz, r4.xyzx
mad r4.xyz, r4.xyzx, cb3[5].yyyy, cb3[21].xyzx
dp3 r0.w, r6.xyzx, r2.xyzx
mov r7.z, v0.w
mad r3.zw, r3.xxxy, cb2[18].xxxy, cb2[18].zzzw
mul r7.xy, r3.zwzz, v0.wwww

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


dp3 r2.w, -r7.xyzx, -r7.xyzx
rsq r2.w, r2.w
mul r7.xyz, r2.wwww, -r7.xyzx
dp3 r8.z, r7.xyzx, cb2[2].xyzx
dp3 r8.x, r7.xyzx, cb2[0].xyzx
dp3 r8.y, r7.xyzx, cb2[1].xyzx
dp3 r2.x, r2.xyzx, r8.xyzx
mul r7.xyz, r5.zxyz, r6.yzxy
mad r6.xyz, r5.yzxy, r6.zxyz, -r7.xyzx
dp3 r2.y, r6.xyzx, r8.xyzx
div r2.xy, r2.xyxx, r0.wwww
mul r1.zw, r1.zzzw, r2.yyyy
mad r1.xy, r2.xxxx, r1.xyxx, r1.zwzz
mul r1.zw, r1.xxxy, cb3[37].xxxy
mul r1.xy, r1.xyxx, cb3[29].xyxx
mad r0.xy, r1.zwzz, r0.zzzz, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t23.xyzw, s11
mul r2.xyzw, v2.xyxy, cb3[36].zwxy
mad r2.xy, r1.zwzz, r0.zzzz, r2.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r2.zwzz, t9.yzwx, s11
sample_indexable(texture2d)(float,float,float,float) r2.xy, r2.xyxx, t24.xyzw, s11
mad r2.xy, r2.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mad r6.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), r2.xyxx
dp2 r0.x, r2.xyxx, r2.xyxx
add r0.x, -r0.x, l(1.000000)
max r0.x, r0.x, l(0.000000)
sqrt r6.z, r0.x
add r2.xyz, r6.xyzx, l(-1.000000, -1.000000, 0.000000, 0.000000)
dp3 r0.x, r2.xyzx, r2.xyzx
rsq r0.x, r0.x
mul r2.xyz, r0.xxxx, r2.xyzx
dp3 r0.x, r8.xyzx, r2.xyzx
mul r0.xy, r2.xyxx, r0.xxxx
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), -r8.xyxx
mul r2.xyzw, v2.xyxy, cb3[33].xyzw
mad r0.xy, cb3[21].wwww, r0.xyxx, r2.xyxx
sample_indexable(texture2d)(float,float,float,float) r2.y, r2.zwzz, t14.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r0.xyxx, t16.xyzw, s11
mul r6.xyz, r6.xyzx, cb3[19].xyzx
add r7.xyz, -cb3[16].xyzx, cb3[17].xyzx
mad r0.xy, r1.zwzz, r0.zzzz, v2.xyxx
mul r1.zw, r0.zzzz, r1.zzzw
mad r1.zw, cb3[31].xxxy, v2.xxxy, r1.zzzw
sample_indexable(texture2d)(float,float,float,float) r9.xyz, r1.zwzz, t17.xyzw, s11
mul r1.zw, r0.xxxy, cb3[28].xxxy
mul r0.xy, r0.xyxx, cb3[39].zwzz
sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t20.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r0.z, r1.zwzz, t18.yzxw, s11
mad r7.xyz, r0.zzzz, r7.xyzx, cb3[16].xyzx
mul r6.xyz, r6.xyzx, r7.xyzx
mad r7.xyz, r9.xyzx, cb3[1].xyzx, -r6.xyzx
dp3 r0.z, r8.xyzx, r5.xyzx
add_sat r1.z, -r0.z, l(1.000000)
mul r3.zw, r5.xxxy, r0.zzzz
mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), -r8.xxxy
mul r3.zw, r3.zzzw, cb3[45].xxxx
sample_indexable(texture2d)(float,float,float,float) r0.z, r3.zwzz, t25.xzyw, s11
log r1.z, r1.z
mul r1.w, r1.z, cb3[20].w
mul r1.z, r1.z, cb3[7].w
exp r1.z, r1.z
exp r1.w, r1.w
mad r6.xyz, r1.wwww, r7.xyzx, r6.xyzx
mul r3.zw, v2.xxxy, cb3[39].xxxy
sample_indexable(texture2d)(float,float,float,float) r7.xyz, r3.zwzz, t21.xyzw, s11
mad r7.xyz, r7.xyzx, cb3[0].xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
add_sat r1.w, cb3[14].w, cb3[18].w
mad r7.xyz, r1.wwww, r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r6.xyz, r6.xyzx, -r7.xyzx
mul r9.x, r4.x, cb3[37].z
mad r9.z, -cb3[37].w, r4.z, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r2.w, r9.xzxx, t1.yzwx, s11
mul r9.xyz, |r5.xyzx|, cb3[18].xyzx
mul r2.w, r2.w, r9.y
mul r10.x, r4.x, cb3[35].x
mad r10.z, -cb3[35].y, r4.y, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r3.z, r10.xzxx, t1.yzxw, s11
mad r2.w, r3.z, r9.z, r2.w
mul r10.x, r4.y, cb3[41].x
mad r10.z, -cb3[41].y, r4.z, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r3.z, r10.xzxx, t1.yzxw, s11
mad r2.w, r3.z, r9.x, r2.w
mad_sat r4.x, r2.w, cb3[19].w, cb3[25].w
mad r6.xyz, r4.xxxx, r6.xyzx, r7.xyzx
add r7.xyz, -cb3[15].xyzx, cb3[20].xyzx
mad r7.xyz, r0.wwww, r7.xyzx, cb3[15].xyzx
mul r9.xyzw, v2.xyxy, cb3[38].zwxy
sample_indexable(texture2d)(float,float,float,float) r3.zw, r9.zwzz, t13.zwxy, s11
mad r4.zw, cb2[24].xxxx, cb3[40].zzzw, r9.xxxy
sample_indexable(texture2d)(float,float,float,float) r4.zw, r4.zwzz, t12.zwxy, s11
mad r9.xy, r4.zwzz, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mad r10.xy, r3.zwzz, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r0.w, r10.xyxx, r10.xyxx
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, l(0.000000)
sqrt r10.z, r0.w
mov r9.z, l(0)
add r9.xyz, r9.xyzx, r10.xyzx
dp3 r0.w, r9.xyzx, r9.xyzx
rsq r0.w, r0.w
mul r9.xyz, r0.wwww, r9.xyzx
dp3 r0.w, r8.xyzx, r9.xyzx
mul r3.zw, r9.xxxy, r0.wwww
mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), -r8.xxxy
mul r3.zw, r3.zzzw, cb3[8].wwww
mad r3.zw, cb3[35].zzzw, v2.xxxy, r3.zzzw
sample_indexable(texture2d)(float,float,float,float) r9.xyz, r3.zwzz, t7.xyzw, s11
mul r9.xyz, r9.xyzx, cb3[26].xyzx
mul r7.xyz, r7.xyzx, r9.xyzx
mul r9.xyzw, v2.xyxy, cb3[30].zwxy
sample_indexable(texture2d)(float,float,float,float) r10.xyz, r9.zwzz, t8.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r0.w, r9.xyxx, t22.yzwx, s11
mad r9.xyz, r10.xyzx, cb3[4].xyzx, -r7.xyzx
mad r7.xyz, r1.zzzz, r9.xyzx, r7.xyzx
add r7.xyz, -r6.xyzx, r7.xyzx
mad_sat r2.x, v1.x, cb3[6].w, cb3[10].w
mov r2.z, l(1.000000)
dp3_sat r4.y, cb3[14].xyzx, r2.xyzx
mad r2.xyz, r4.yyyy, r7.xyzx, r6.xyzx
sample_indexable(texture2d)(float,float,float,float) r1.z, v2.xyxx, t4.yzxw, s11
add r1.z, r1.z, l(-0.500000)
mul r1.z, r1.z, cb3[17].w
mul r3.zw, v2.xxxy, cb3[31].zzzw
mad r1.xy, r1.xyxx, r1.zzzz, r3.zwzz
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r1.xyxx, t3.xyzw, s11
mad r1.xyz, r1.xyzx, cb3[2].xyzx, -r2.xyzx
mad_sat r2.w, v1.x, cb3[16].w, cb3[15].w
mad r1.xyz, r2.wwww, r1.xyzx, r2.xyzx
mul r6.xyzw, v2.xyxy, cb3[34].zwxy
sample_indexable(texture2d)(float,float,float,float) r2.xyz, r6.zwzz, t2.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r3.z, r6.xyxx, t25.yzxw, s11
mul r3.z, r3.z, cb3[44].y
mul_sat r0.z, r0.z, r3.z
mad r2.xyz, r2.xyzx, cb3[3].xyzx, -r1.xyzx
mad_sat r3.z, v1.x, cb3[24].w, cb3[22].w
mad r1.xyz, r3.zzzz, r2.xyzx, r1.xyzx
max r2.x, r2.w, r3.z
add r2.x, -r2.x, l(1.000000)
mul r2.xy, r4.xyxx, r2.xxxx
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r3.xyxx, t5.xyzw, s10
dp3 r2.z, r8.xyzx, r6.xyzx
mov_sat r3.w, r2.z
add r4.z, -r3.w, l(1.000000)
log r4.z, r4.z
mul r4.w, r4.z, cb3[43].y
mul r4.z, r4.z, cb3[44].x
exp r4.z, r4.z
mul r7.xyz, r4.zzzz, cb3[22].xyzx
exp r4.z, r4.w
mul r9.xyz, r4.zzzz, cb3[8].xyzx
ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r10.xyz, cb7[0].x, l(16), t54.xyzx
dp3 r11.x, -r10.xyzx, cb2[0].xyzx
dp3 r11.y, -r10.xyzx, cb2[1].xyzx
dp3 r11.z, -r10.xyzx, cb2[2].xyzx
movc r10.xyz, cb7[0].yyyy, r11.xyzx, l(0,0,0,0)
dp3_sat r4.z, r10.xyzx, r6.xyzx
dp3 r4.w, -r8.xyzx, r10.xyzx
add r10.xy, r4.wwww, cb3[45].zwzz
mul r6.xyz, r6.xyzx, r2.zzzz
max r2.z, r2.z, l(1.000000012E-007)
add r2.z, -r2.z, l(1.000000)
mad r6.xyz, r6.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r8.xyzx
dp3 r4.w, r6.xyzx, r5.xyzx
mad_sat r4.w, cb3[46].y, r4.w, l(1.000000)
mul r4.w, r4.w, r4.w
mad r5.x, -r3.w, cb3[42].y, l(1.000000)
mad r3.w, -r3.w, cb3[43].w, l(1.000000)
mad r5.yzw, r4.zzzz, r7.xxyz, r3.wwww
mad r6.xyz, r4.zzzz, r9.xyzx, r5.xxxx
add r6.xyz, r6.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r6.xyz, r2.xxxx, r6.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r5.xyz, r5.yzwy, -r6.xyzx
mad r5.xyz, r2.yyyy, r5.xyzx, r6.xyzx
mul r1.xyz, r1.xyzx, r5.xyzx
add r3.w, -cb3[45].y, cb3[46].x
mad r0.y, r0.y, r3.w, cb3[45].y
add r3.w, -r0.y, cb3[43].z
mad r0.y, r0.z, r3.w, r0.y
add r3.w, -cb3[9].w, cb3[13].w
mul r5.xy, v2.xyxx, cb3[28].zwzz
sample_indexable(texture2d)(float,float,float,float) r5.xy, r5.xyxx, t19.xyzw, s11
mad r3.w, r5.y, r3.w, cb3[9].w
mad r5.xyz, cb3[13].xyzx, r5.xxxx, 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)
add r3.w, r3.w, l(-1.000000)
mad r3.w, r1.w, r3.w, l(1.000000)
add r0.y, r0.y, -r3.w
mad r0.y, r4.x, r0.y, r3.w
add r3.w, cb3[11].w, -cb3[12].w
mul r6.xy, v2.xyxx, cb3[41].zwzz
sample_indexable(texture2d)(float,float,float,float) r6.xy, r6.xyxx, t10.xyzw, s11
mad r3.w, r6.y, r3.w, cb3[12].w
add r3.w, -r0.y, r3.w
mad r0.y, r4.y, r3.w, r0.y
add r0.y, r0.y, l(2.000000)
mul r0.y, r0.y, l(0.010000)
mul r6.yzw, r0.xxxx, cb3[10].xxyz
mad r7.xyz, -cb3[10].xyzx, r0.xxxx, cb3[7].xyzx
mad r6.yzw, r0.zzzz, r7.xxyz, r6.yyzw
add r6.yzw, -r5.xxyz, r6.yyzw
mad r5.xyz, r4.xxxx, r6.yzwy, r5.xyzx
mad r6.xyz, cb3[23].xyzx, r6.xxxx, -r5.xyzx
mad r5.xyz, r4.yyyy, r6.xyzx, r5.xyzx
mul r0.xyz, r0.yyyy, r5.xyzx
dp3 r3.w, r5.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
add r4.z, cb3[44].w, cb3[44].z
add_sat r4.z, -r4.z, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r5.x, r3.xyxx, t0.xyzw, s10
mad r4.z, cb3[44].z, r5.x, r4.z
mul r5.x, r5.x, r5.x
mad_sat r4.z, r5.x, cb3[44].w, r4.z
add r5.xyz, -cb3[12].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad_sat r5.xyz, r4.zzzz, r5.xyzx, cb3[12].xyzx
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r3.xyxx, t52.xyzw, s13
sample_indexable(texture2d)(float,float,float,float) r7.xyz, r3.xyxx, t51.xyzw, s13
mul r6.xyz, r5.xyzx, r6.xyzx
mul r0.xyz, r0.xyzx, r6.xyzx
add r3.xy, cb3[45].zwzz, l(1.000000, 1.000000, 0.000000, 0.000000)
div r3.xy, r10.xyxx, r3.xyxx
max r3.xy, r3.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r6.xy, v2.xyxx, cb3[40].xyxx
sample_indexable(texture2d)(float,float,float,float) r4.z, r6.xyxx, t11.yzxw, s11
mad r4.z, -r4.x, r0.w, r4.z
mul r0.w, r0.w, r4.x
mad r0.w, r4.y, r4.z, r0.w
ftoi r6.xy, v0.xyxx
mov r6.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r6.xyz, r6.xyzw, t53.xyzw
add r8.xyz, r6.xyzx, -cb3[9].xyzx
mad r8.xyz, cb3[42].xxxx, r8.xyzx, cb3[9].xyzx
add r9.xyz, r7.xyzx, -cb3[9].xyzx
mad r9.xyz, cb3[43].xxxx, r9.xyzx, cb3[9].xyzx
mul r8.xyz, r8.xyzx, r9.xyzx
mul r8.xyz, r8.xyzx, cb3[42].zzzz
mul r8.xyz, r0.wwww, r8.xyzx
mul r9.xyz, r7.xyzx, cb3[27].wwww
mad r9.xyz, r6.xyzx, cb3[26].wwww, r9.xyzx
add r9.xyz, r9.xyzx, cb3[42].wwww
mad r10.xyz, r3.xxxx, r8.xyzx, r9.xyzx
mad r8.xyz, r8.xyzx, r3.yyyy, r9.xyzx
add r9.xyz, -r7.xyzx, r10.xyzx
mad r7.xyz, r2.xxxx, r9.xyzx, r7.xyzx
add r8.xyz, -r7.xyzx, r8.xyzx
mad r7.xyz, r2.yyyy, r8.xyzx, r7.xyzx
mul r8.xyz, r1.wwww, cb3[27].xyzx
mad r9.xyz, -r1.wwww, cb3[27].xyzx, cb3[24].xyzx
mad r8.xyz, r4.xxxx, r9.xyzx, r8.xyzx
add r9.xyz, -r8.xyzx, cb3[6].xyzx
mad r4.xyz, r4.yyyy, r9.xyzx, r8.xyzx
add r8.xyz, -r4.xyzx, cb3[25].xyzx
mad r2.xyw, r2.wwww, r8.xyxz, r4.xyxz
add r4.xyz, -r2.xywx, cb3[11].xyzx
mad r2.xyw, r3.zzzz, r4.xyxz, r2.xyxw
add r2.xyw, r2.xyxw, r7.xyxz
add r2.xyw, r2.xyxw, r6.xyxz
mul r2.xyw, r2.xyxw, r5.xyxz
mad r0.xyz, r2.xywx, r1.xyzx, r0.xyzx
max o0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mov o0.w, l(1.000000)
mul r0.x, r2.z, r2.z
mul r0.x, r0.x, r0.x
mul r0.x, r2.z, r0.x
mad r0.x, r0.x, l(0.960000), l(0.040000)
mul r0.x, r0.x, r5.x
mul r0.x, r4.w, r0.x
mul r0.x, r3.w, r0.x
mul_sat r0.x, r0.x, l(0.250000)
sqrt o1.x, r0.x
ret 
// Approximately 295 instruction slots used
