//37afb4b12ed6e7cb-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Sat Feb 06 00:33:05 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 WorldBuffer
// {
//
//   struct WorldStruct
//   {
//       
//       row_major float4x4 ViewProject;// Offset:    0
//       
//       struct WorldStruct_PerInstanceData
//       {
//           
//           row_major float4x4 World;  // Offset:   64
//           row_major float4x4 WorldViewProject;// Offset:  128
//
//       } PerInstance[256];            // Offset:   64
//
//   } WorldParameters;                 // Offset:    0 Size: 32832
//
// }
//
// 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 [unused]
//   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_n264_n326_661830C016465534_cp0_Param_texture    texture  float4          2d    0        1
// p_default_Setup_n9_8B09DC7019763283_cp1_Param_texture    texture  float4          2d    1        1
// p_default_Setup_n9_9075B4F026705685_cp2_Param_texture    texture  float4          2d    2        1
// p_default_Setup_n9_1BB3530022408697_cp0_Param_texture    texture  float4          2d    3        1
// p_default_Setup_n15_n97_Texture_texture    texture  float4          2d    4        1
// p_default_Setup_n30_NormalBufferTexture_texture    texture  float4          2d    5        1
// p_default_Setup_n15_n100_Texture_texture    texture  float4          2d    7        1
// p_default_Setup_n15_n185_Texture_texture    texture  float4          2d    8        1
// p_default_Setup_8CD6AD409878073_cp6_Param_texture    texture  float4          2d    9        1
// p_default_Setup_n9_B217A49024294212_Param_texture    texture  float4        cube   10        1
// p_default_Setup_n9_n149_Texture_texture    texture  float4          2d   11        1
// p_default_Setup_n15_n149_Texture_texture    texture  float4          2d   12        1
// p_default_Setup_n15_B217A49024294212_Param_texture    texture  float4        cube   13        1
// p_default_Setup_n9_n185_Texture_texture    texture  float4          2d   14        1
// p_default_Setup_n6_n97_Texture_texture    texture  float4          2d   15        1
// p_default_Setup_n6_n100_Texture_texture    texture  float4          2d   16        1
// p_default_Setup_n6_9075B4F026705685_cp2_Param_texture    texture  float4          2d   17        1
// p_default_Setup_n15_8B09DC7019763283_cp1_Param_texture    texture  float4          2d   18        1
// p_default_Setup_n9_n100_Texture_texture    texture  float4          2d   19        1
// p_default_Setup_n9_n97_Texture_texture    texture  float4          2d   20        1
// p_default_Setup_n6_8B09DC7019763283_cp1_Param_texture    texture  float4          2d   21        1
// p_default_Setup_n15_1BB3530022408697_cp0_Param_texture    texture  float4          2d   22        1
// p_default_Setup_n9_8B09DF1018700059_cp0_Param_texture    texture  float4          2d   23        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
// WorldBuffer                       cbuffer      NA          NA    0        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 
// PSIZE                    0   x           3     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 cb0[2045], dynamicIndexed
// dcl_constantbuffer cb2[46], immediateIndexed
dcl_constantbuffer cb2[82], immediateIndexed
dcl_constantbuffer cb3[43], 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_texturecube (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t12
dcl_resource_texturecube (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) t23
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.xy
dcl_input_ps linear v2.xyz
dcl_input_ps constant v3.x
dcl_output o0.xyzw
dcl_output o1.x
// dcl_temps 12
dcl_temps 14
dcl_resource_texture2d (float,float,float,float) t125
deriv_rty_fine r0.xy, v1.xyxx
deriv_rtx_fine r1.xy, v1.xyxx
mul r0.w, r0.x, r1.y
mad r0.w, r1.x, r0.y, -r0.w
lt r1.z, l(0.000000), |r0.w|
lt r0.w, r0.w, l(0.000000)
movc r0.w, r0.w, l(-1.000000), l(1.000000)
mov r0.z, -r1.y
mul r2.xy, r0.yzyy, r0.wwww
mov r3.z, v0.w
mov r3.w, l(1.000000)
mad r2.zw, v0.xxxy, cb2[45].zzzw, cb2[45].xxxy
mul r3.xy, r2.zwzz, 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 r3.x, r3.x, -r13.w


dp4 r4.x, cb2[15].xyzw, r3.xyzw
dp4 r4.y, cb2[16].xyzw, r3.xyzw
dp4 r4.z, cb2[17].xyzw, r3.xyzw
deriv_rty_fine r3.xyz, r4.zxyz
dp3 r0.z, v2.xyzx, v2.xyzx
rsq r0.z, r0.z
mul r5.xyz, r0.zzzz, v2.xyzx
dp3 r1.w, r3.yzxy, r5.xyzx
mad r6.xyz, -r1.wwww, r5.xyzx, r3.yzxy
mul r7.xyz, r2.yyyy, r6.xyzx
deriv_rtx_fine r8.xyz, r4.xyzx
mad r4.xyzw, r4.xzyz, cb3[2].yyyy, cb3[20].xzyz
dp3 r1.w, r8.xyzx, r5.xyzx
mad r9.xyz, -r1.wwww, r5.yzxy, r8.yzxy
mad r7.xyz, r9.zxyz, r2.xxxx, r7.xyzx
dp3 r1.w, r7.xyzx, r7.xyzx
rsq r1.w, r1.w
mul r10.xyz, r1.wwww, r7.xyzx
movc r7.xyz, r1.zzzz, r10.xyzx, r7.xyzx
mul r10.xyz, r5.zxyz, r7.yzxy
mad r10.xyz, r5.yzxy, r7.zxyz, -r10.xyzx
mul r11.xyz, r5.zxyz, r9.xyzx
mad r9.xyz, r5.yzxy, r9.yzxy, -r11.xyzx
dp3 r1.z, r6.xyzx, r9.xyzx
lt r1.z, r1.z, l(0.000000)
movc r1.z, r1.z, l(-1.000000), l(1.000000)
mul r0.w, r0.w, r1.z
mul r6.xyz, r0.wwww, r10.xyzx
mul r9.xyz, r3.xyzx, r5.yzxy
mad r3.xyz, r3.zxyz, r5.zxyz, -r9.xyzx
dp3 r0.w, r8.xyzx, r3.xyzx
mad r1.zw, r2.zzzw, cb2[18].xxxy, cb2[18].zzzw
mul r9.xy, r1.zwzz, v0.wwww
mov r9.z, v0.w

//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 r9.x, r9.x, -r13.w


dp3 r1.z, -r9.xyzx, -r9.xyzx
rsq r1.z, r1.z
mul r9.xyz, r1.zzzz, -r9.xyzx
dp3 r10.x, r9.xyzx, cb2[0].xyzx
dp3 r10.y, r9.xyzx, cb2[1].xyzx
dp3 r10.z, r9.xyzx, cb2[2].xyzx
dp3 r2.x, r3.xyzx, r10.xyzx
mul r3.xyz, r5.zxyz, r8.yzxy
mad r3.xyz, r5.yzxy, r8.zxyz, -r3.xyzx
dp3 r2.y, r3.xyzx, r10.xyzx
div r1.zw, r2.xxxy, r0.wwww
mul r0.xy, r0.xyxx, r1.wwww
mad r0.xy, r1.zzzz, r1.xyxx, r0.xyxx
mul r0.xy, r0.xyxx, cb3[26].zwzz
ishl r0.w, v3.x, l(3)
dp3 r0.w, cb0[r0.w + 4].xyzx, cb0[r0.w + 4].xyzx
sqrt r0.w, r0.w
mul r1.xy, r0.wwww, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r1.z, r1.xyxx, t23.yzxw, s11
add r1.z, r1.z, l(-0.500000)
mul r1.z, r1.z, cb3[19].w
mul r2.xy, r0.xyxx, r1.zzzz
mad r0.xy, r0.xyxx, r1.zzzz, v1.xyxx
mul r0.xy, r0.xyxx, cb3[35].xyxx
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t14.xyzw, s11
mad r1.zw, r1.xxxy, cb3[30].zzzw, r2.xxxy
sample_indexable(texture2d)(float,float,float,float) r1.zw, r1.zwzz, t3.zwxy, s11
mad r1.zw, r1.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r0.y, -r1.z, r1.z, l(1.000000)
mad r0.y, -r1.w, r1.w, r0.y
mul r3.xy, r1.zwzz, r1.zwzz
max r3.x, r3.y, r3.x
mul r3.x, r3.x, l(0.0000610351563)
max r0.y, r0.y, r3.x
rsq r0.y, r0.y
mul r1.zw, r1.zzzw, -r0.yyyy
mul r3.xy, r1.xyxx, cb3[29].xyxx
sample_indexable(texture2d)(float,float,float,float) r3.xy, r3.xyxx, t22.xyzw, s11
mad r3.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mad r0.y, -r3.x, r3.x, l(1.000000)
mad r0.y, -r3.y, r3.y, r0.y
mul r3.zw, r3.xxxy, r3.xxxy
max r3.z, r3.w, r3.z
mul r3.z, r3.z, l(0.0000610351563)
max r0.y, r0.y, r3.z
rsq r0.y, r0.y
mul r3.xy, r3.xyxx, -r0.yyyy
mul r3.xy, r3.xyxx, cb3[24].wwww
dp3 r0.y, r10.xyzx, r5.xyzx
add_sat r3.z, -r0.y, l(1.000000)
log r3.z, r3.z
mul r3.w, r3.z, cb3[6].w
exp r3.w, r3.w
mad_sat r8.x, cb3[9].w, r3.w, cb3[11].w
mul r3.xy, r3.xyxx, r8.xxxx
mad r1.zw, r1.zzzw, cb3[41].yyyy, -r3.xxxy
mul r8.zw, v1.xxxy, cb3[31].xxxy
mul r8.zw, r0.wwww, r8.zzzw
mad r9.xy, v1.xyxx, r0.wwww, r2.xyxx
mad r2.xy, cb3[31].zwzz, r1.xyxx, r2.xyxx
sample_indexable(texture2d)(float,float,float,float) r11.xyz, r2.xyxx, t20.xyzw, s11
mul r2.xy, r9.xyxx, cb3[34].zwzz
sample_indexable(texture2d)(float,float,float,float) r2.xy, r2.xyxx, t19.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r9.y, r8.zwzz, t2.yxzw, s11
mov r9.z, l(1.000000)
mul r0.w, r3.z, cb3[4].w
exp r0.w, r0.w
mad_sat r9.x, cb3[8].w, r0.w, cb3[25].w
dp3_sat r8.y, cb3[9].xyzx, r9.xyzx
mad r1.zw, r8.yyyy, r1.zzzw, r3.xxxy
mul r3.xyw, r6.xyxz, r1.wwww
mad r3.xyw, r1.zzzz, r7.xyxz, r3.xyxw
mad r3.xyw, v2.xyxz, r0.zzzz, -r3.xyxw
dp3 r0.z, r3.xywx, r3.xywx
rsq r0.z, r0.z
mad r3.xyw, r3.xyxw, r0.zzzz, -r5.xyxz
mad r3.xyw, cb3[18].wwww, r3.xyxw, r5.xyxz
dp3 r0.z, -r10.xyzx, r3.xywx
mad r0.w, -r0.z, r0.z, l(1.000000)
mad r0.w, -r0.w, l(1.71609986), l(1.000000)
sqrt r1.z, r0.w
ge r0.w, r0.w, l(0.000000)
mad r0.z, r0.z, l(1.310000), r1.z
mul r6.xyz, r10.xyzx, l(-1.310000, -1.310000, -1.310000, 0.000000)
mad r7.xyz, -r0.zzzz, r3.xywx, r6.xyzx
and r7.xyz, r0.wwww, r7.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r7.xyz, r7.xyzx, t10.xyzw, s11, l(0.000000)
dp3 r0.z, r10.xyzx, r3.xywx
mul r3.xyw, r3.xyxw, r0.zzzz
max r0.z, r0.z, l(1.000000012E-007)
mad r0.z, -r0.z, r0.z, l(1.000000)
mad_sat r0.z, -r0.z, l(2.250000), l(1.000000)
mad r3.xyw, r3.xyxw, l(2.000000, 2.000000, 0.000000, 2.000000), -r10.xyxz
sample_l_indexable(texturecube)(float,float,float,float) r3.xyw, r3.xywx, t10.xywz, s11, l(0.000000)
add r7.xyz, -r3.xywx, r7.xyzx
mad r3.xyw, r0.zzzz, r7.xyxz, r3.xyxw
max r3.xyw, r3.xyxw, l(0.000000, 0.000000, 0.000000, 0.000000)
log r3.xyw, r3.xyxw
div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), cb3[5].w
mul r3.xyw, r3.xyxw, r0.zzzz
exp r3.xyw, r3.xyxw
add r7.xyz, cb3[13].xyzx, -cb3[15].xyzx
mad r0.xzw, r0.xxxx, r7.xxyz, cb3[15].xxyz
mul r0.xzw, r0.xxzw, r3.xxyw
mad r3.xyw, r11.xyxz, cb3[1].xyxz, -r0.xzxw
mul r1.z, r3.z, cb3[12].w
mul r1.w, r3.z, cb3[10].w
exp r1.w, r1.w
exp r1.z, r1.z
mad r0.xzw, r1.zzzz, r3.xxyw, r0.xxzw
mul r3.xy, r1.xyxx, cb3[28].zwzz
mul r1.xy, r1.xyxx, cb3[32].zwzz
sample_indexable(texture2d)(float,float,float,float) r1.xy, r1.xyxx, t7.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t4.xyzw, s11
dp3 r1.z, -r10.xyzx, r5.xyzx
mad r3.w, -r1.z, r1.z, l(1.000000)
mad r3.w, -r3.w, l(1.71609986), l(1.000000)
sqrt r5.w, r3.w
ge r3.w, r3.w, l(0.000000)
mad r1.z, r1.z, l(1.310000), r5.w
mad r6.xyz, -r1.zzzz, r5.xyzx, r6.xyzx
and r6.xyz, r3.wwww, r6.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r6.xyz, r6.xyzx, t13.xyzw, s11, l(0.000000)
mul r7.xyz, r5.xyzx, r0.yyyy
max r0.y, r0.y, l(1.000000012E-007)
mad r0.y, -r0.y, r0.y, l(1.000000)
mad_sat r0.y, -r0.y, l(2.250000), l(1.000000)
mad r7.xyz, r7.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r10.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r9.xyz, r7.xyzx, t13.xyzw, s11, l(0.000000)
add r6.xyz, r6.xyzx, -r9.xyzx
mad r6.xyz, r0.yyyy, r6.xyzx, r9.xyzx
max r6.xyz, r6.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
log r6.xyz, r6.xyzx
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), cb3[7].w
mul r6.xyz, r6.xyzx, r0.yyyy
exp r6.xyz, r6.xyzx
mul r7.zw, v1.xxxy, cb3[34].xxxy
sample_indexable(texture2d)(float,float,float,float) r0.y, r7.zwzz, t8.yxzw, s11
add r9.xyz, -cb3[4].xyzx, cb3[5].xyzx
mad r9.xyz, r0.yyyy, r9.xyzx, cb3[4].xyzx
mul r6.xyz, r6.xyzx, r9.xyzx
mad r3.xyz, r3.xyzx, cb3[3].xyzx, -r6.xyzx
mad r3.xyz, r1.wwww, r3.xyzx, r6.xyzx
add r3.xyz, r3.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r3.xyz, r8.xxxx, r3.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r0.xyz, r0.xzwx, -r3.xyzx
mad r0.xyz, r8.yyyy, r0.xyzx, r3.xyzx
mul r1.zw, v1.xxxy, cb3[26].xxxy
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r1.zwzz, t15.xyzw, s11
mad r3.xyz, r3.xyzx, cb3[0].xyzx, -r0.xyzx
mul r6.x, r4.x, cb3[33].z
mad r6.z, -cb3[33].w, r4.z, l(1.000000)
mul r4.xyzw, r4.xyzw, cb3[27].xyzw
mad r4.xyzw, r4.xyzw, l(1.000000, -1.000000, 1.000000, -1.000000), l(0.000000, 1.000000, 0.000000, 1.000000)
sample_indexable(texture2d)(float,float,float,float) r0.w, r6.xzxx, t9.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r1.z, r4.xyxx, t9.xywz, s11
sample_indexable(texture2d)(float,float,float,float) r1.w, r4.zwzz, t9.xyzw, s11
mul r4.xyz, |r5.xyzx|, cb3[18].xyzx
mul r1.z, r1.z, r4.y
mad r0.w, r0.w, r4.z, r1.z
mad r0.w, r1.w, r4.x, r0.w
dp3 r1.z, cb3[22].xyzx, cb3[22].xyzx
rsq r1.z, r1.z
mul r4.xyz, r1.zzzz, cb3[22].xyzx
dp3 r1.z, -r4.xyzx, r5.xyzx
add r1.z, r1.z, -cb3[42].y
add r1.w, cb3[41].z, -cb3[42].y
div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.w
mul_sat r1.z, r1.w, r1.z
mad r1.w, r1.z, l(-2.000000), l(3.000000)
mul r1.z, r1.z, r1.z
mul r1.z, r1.z, r1.w
min r1.z, r1.z, l(1.000000)
mul r0.w, r0.w, r1.z
mad_sat r4.x, r0.w, cb3[16].w, cb3[23].w
mul r1.zw, v1.xxxy, cb3[30].xxxy
sample_indexable(texture2d)(float,float,float,float) r4.y, r1.zwzz, t17.yxzw, s11
mov r4.z, l(1.000000)
dp3_sat r0.w, cb3[7].xyzx, r4.xyzx
mad r0.xyz, r0.wwww, r3.xyzx, r0.xyzx
add r1.z, -r0.w, l(1.000000)
mul r1.zw, r8.xxxy, r1.zzzz
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r2.zwzz, t5.xyzw, s10
dp3 r3.w, r10.xyzx, r3.xyzx
mov_sat r4.x, r3.w
add r4.y, -r4.x, l(1.000000)
log r4.y, r4.y
mul r4.z, r4.y, cb3[39].z
mul r4.y, r4.y, cb3[40].y
exp r4.y, r4.y
mul r6.xyz, r4.yyyy, cb3[16].xyzx
exp r4.y, r4.z
mul r4.yzw, r4.yyyy, cb3[24].xxyz
ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r9.xyz, cb7[0].x, l(16), t54.xyzx
dp3 r11.x, -r9.xyzx, cb2[0].xyzx
dp3 r11.y, -r9.xyzx, cb2[1].xyzx
dp3 r11.z, -r9.xyzx, cb2[2].xyzx
movc r9.xyz, cb7[0].yyyy, r11.xyzx, l(0,0,0,0)
dp3_sat r5.w, r9.xyzx, r3.xyzx
dp3 r6.w, -r10.xyzx, r9.xyzx
mul r3.xyz, r3.xyzx, r3.wwww
max r3.w, r3.w, l(1.000000012E-007)
add r3.w, -r3.w, l(1.000000)
mad r3.xyz, r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r10.xyzx
dp3 r3.x, r3.xyzx, r5.xyzx
mad_sat r3.x, cb3[42].z, r3.x, l(1.000000)
mul r3.x, r3.x, r3.x
mad r3.y, -r4.x, cb3[38].z, l(1.000000)
mad r3.z, -r4.x, cb3[40].x, l(1.000000)
mad r5.xyz, r5.wwww, r6.xyzx, r3.zzzz
mad r4.xyz, r5.wwww, r4.yzwy, r3.yyyy
add r4.xyz, r4.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r4.xyz, r1.zzzz, r4.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r5.xyz, -r4.xyzx, r5.xyzx
mad r4.xyz, r1.wwww, r5.xyzx, r4.xyzx
mul r0.xyz, r0.xyzx, r4.xyzx
mul r4.xyz, r2.xxxx, cb3[21].xyzx
mad r5.xyz, -cb3[21].xyzx, r2.xxxx, cb3[23].xyzx
mul r3.yz, r7.xxyx, cb3[39].wwww
sample_indexable(texture2d)(float,float,float,float) r2.x, r3.yzyy, t1.yxzw, s11
mul r3.yz, v1.xxyx, cb3[28].xxyx
sample_indexable(texture2d)(float,float,float,float) r3.y, r3.yzyy, t1.yxzw, s11
mul r3.y, r3.y, cb3[37].z
mul_sat r2.x, r2.x, r3.y
mad r4.xyz, r2.xxxx, r5.xyzx, r4.xyzx
mul r3.yz, r7.xxyx, cb3[21].wwww
mul r5.xy, r7.xyxx, cb3[17].wwww
sample_indexable(texture2d)(float,float,float,float) r4.w, r5.xyxx, t21.xzwy, s11
sample_indexable(texture2d)(float,float,float,float) r3.y, r3.yzyy, t18.xyzw, s11
mul r5.xy, v1.xyxx, cb3[33].xyxx
sample_indexable(texture2d)(float,float,float,float) r3.z, r5.xyxx, t18.yzxw, s11
mul r3.z, r3.z, cb3[15].w
mul_sat r3.y, r3.z, r3.y
mul r5.xyz, r1.xxxx, cb3[8].xyzx
mad r6.xyz, -cb3[8].xyzx, r1.xxxx, cb3[19].xyzx
mad r5.xyz, r3.yyyy, r6.xyzx, r5.xyzx
add r5.xyz, r5.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r5.xyz, r8.xxxx, r5.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r4.xyz, r4.xyzx, -r5.xyzx
mad r4.xyz, r8.yyyy, r4.xyzx, r5.xyzx
mul r5.xy, v1.xyxx, cb3[32].xyxx
sample_indexable(texture2d)(float,float,float,float) r1.x, r5.xyxx, t21.xyzw, s11
mul r1.x, r1.x, cb3[20].w
mul_sat r1.x, r1.x, r4.w
mul r5.xy, v1.xyxx, cb3[29].zwzz
sample_indexable(texture2d)(float,float,float,float) r3.z, r5.xyxx, t16.yzxw, s11
mul r5.xyz, r3.zzzz, cb3[25].xyzx
mad r6.xyz, -cb3[25].xyzx, r3.zzzz, cb3[6].xyzx
mad r5.xyz, r1.xxxx, r6.xyzx, r5.xyzx
add r5.xyz, -r4.xyzx, r5.xyzx
mad r4.xyz, r0.wwww, r5.xyzx, r4.xyzx
add r3.z, -cb3[37].y, cb3[40].z
mad r2.y, r2.y, r3.z, cb3[37].y
add r3.z, -r2.y, cb3[36].w
mad r2.x, r2.x, r3.z, r2.y
add r2.y, cb3[36].z, -cb3[37].x
mad r1.y, r1.y, r2.y, cb3[37].x
add r2.y, -r1.y, cb3[13].w
mad r1.y, r3.y, r2.y, r1.y
add r1.y, r1.y, l(-1.000000)
mad r1.y, r8.x, r1.y, l(1.000000)
add r2.x, -r1.y, r2.x
mad r1.y, r8.y, r2.x, r1.y
add r2.x, -cb3[14].w, cb3[22].w
mad r1.x, r1.x, r2.x, cb3[14].w
add r1.x, -r1.y, r1.x
mad r1.x, r0.w, r1.x, r1.y
add r1.x, r1.x, l(2.000000)
mul r1.x, r1.x, l(0.010000)
mul r5.xyz, r1.xxxx, r4.xyzx
dp3 r1.x, r4.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r2.zwzz, t52.xyzw, s13
sample_indexable(texture2d)(float,float,float,float) r2.xyz, r2.zwzz, t51.xyzw, s13
add r1.y, cb3[40].w, cb3[41].x
add_sat r1.y, -r1.y, l(1.000000)
ftoi r7.xy, v0.xyxx
mov r7.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r2.w, r7.xyww, t0.yzwx
ld_indexable(texture2d)(float,float,float,float) r6.xyz, r7.xyzw, t53.xyzw
mad r1.y, cb3[40].w, r2.w, r1.y
mul r2.w, r2.w, r2.w
mad_sat r1.y, r2.w, cb3[41].x, r1.y
add r7.xyz, -cb3[14].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad_sat r7.xyz, r1.yyyy, r7.xyzx, cb3[14].xyzx
mul r4.xyz, r4.xyzx, r7.xyzx
mul r4.xyz, r5.xyzx, r4.xyzx
add r1.y, r6.w, cb3[41].w
add r2.w, r6.w, cb3[42].x
add r3.y, cb3[41].w, l(1.000000)
div r1.y, r1.y, r3.y
max r1.y, r1.y, l(0.000000)
mul r3.yz, v1.xxyx, cb3[35].zzwz
sample_indexable(texture2d)(float,float,float,float) r3.y, r3.yzyy, t11.yxzw, s11
mul r5.xy, v1.xyxx, cb3[36].xyxx
sample_indexable(texture2d)(float,float,float,float) r3.z, r5.xyxx, t12.yzxw, s11
mad r3.y, -r8.x, r3.z, r3.y
mul r3.z, r3.z, r8.x
mad r3.y, r8.y, r3.y, r3.z
add r5.xyz, r6.xyzx, -cb3[10].xyzx
mad r5.xyz, cb3[38].yyyy, r5.xyzx, cb3[10].xyzx
add r9.xyz, r2.xyzx, -cb3[10].xyzx
mad r9.xyz, cb3[39].yyyy, r9.xyzx, cb3[10].xyzx
mul r5.xyz, r5.xyzx, r9.xyzx
mul r5.xyz, r5.xyzx, cb3[38].wwww
mul r5.xyz, r3.yyyy, r5.xyzx
mul r9.xyz, r2.xyzx, cb3[38].xxxx
mad r9.xyz, r6.xyzx, cb3[37].wwww, r9.xyzx
add r9.xyz, r9.xyzx, cb3[39].xxxx
mad r10.xyz, r1.yyyy, r5.xyzx, r9.xyzx
add r10.xyz, -r2.xyzx, r10.xyzx
mad r2.xyz, r1.zzzz, r10.xyzx, r2.xyzx
add r1.y, cb3[42].x, l(1.000000)
div r1.y, r2.w, r1.y
max r1.y, r1.y, l(0.000000)
mad r5.xyz, r5.xyzx, r1.yyyy, r9.xyzx
add r5.xyz, -r2.xyzx, r5.xyzx
mad r1.yzw, r1.wwww, r5.xxyz, r2.xxyz
mul r2.xyz, r8.xxxx, cb3[12].xyzx
mad r5.xyz, -r8.xxxx, cb3[12].xyzx, cb3[17].xyzx
mad r2.xyz, r8.yyyy, r5.xyzx, r2.xyzx
add r5.xyz, -r2.xyzx, cb3[11].xyzx
mad r2.xyz, r0.wwww, r5.xyzx, r2.xyzx
add r1.yzw, r1.yyzw, r2.xxyz
add r1.yzw, r1.yyzw, r6.xxyz
mul r1.yzw, r1.yyzw, r7.xxyz
mad r0.xyz, r1.yzwy, r0.xyzx, r4.xyzx
max o0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mov o0.w, l(1.000000)
mul r0.x, r3.w, r3.w
mul r0.x, r0.x, r0.x
mul r0.x, r3.w, r0.x
mad r0.x, r0.x, l(0.960000), l(0.040000)
mul r0.x, r0.x, r7.x
mul r0.x, r3.x, r0.x
mul r0.x, r1.x, r0.x
mul_sat r0.x, r0.x, l(0.250000)
sqrt o1.x, r0.x
ret 
// Approximately 385 instruction slots used
