//6677c3d8a28cc53f-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Sun Feb 14 00:15:47 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 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
//   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
//   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
//   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_n201_n222_n232_661830C016465534_cp0_Param_texture    texture  float4          2d    0        1
// p_default_Material_n205_5423B6201464972_cp8_Param_texture    texture  float4          2d    1        1
// p_default_Setup_n33_n65_Texture_texture    texture  float4          2d    2        1
// p_default_Setup_n44_BD8AA44026454365_cp7_Param_texture    texture  float4          2d    3        1
// p_default_Setup_n34_n65_Texture_texture    texture  float4          2d    5        1
// p_default_Setup_n13_n136_Texture_texture    texture  float4          2d    6        1
// p_default_Setup_n40_n67_Texture_texture    texture  float4          2d    7        1
// p_default_Setup_n19_n65_Texture_texture    texture  float4          2d    8        1
// p_default_Setup_n13_n123_Texture_texture    texture  float4          2d    9        1
// p_default_Setup_n19_n67_Texture_texture    texture  float4          2d   10        1
// p_default_Setup_n13_n121_Texture_texture    texture  float4          2d   11        1
// p_default_Setup_n38_Texture_texture    texture  float4          2d   12        1
// p_default_Setup_n13_n115_Texture_texture    texture  float4          2d   13        1
// p_default_Setup_n34_n67_Texture_texture    texture  float4          2d   15        1
// p_default_Setup_n8_NormalBufferTexture_texture    texture  float4          2d   16        1
// p_default_Setup_n33_n67_Texture_texture    texture  float4          2d   17        1
// p_default_Setup_n40_n65_Texture_texture    texture  float4          2d   18        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
// WorldBuffer                       cbuffer      NA          NA    0        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
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// 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[2048], dynamicIndexed
dcl_constantbuffer cb2[95], immediateIndexed
dcl_constantbuffer cb3[25], immediateIndexed
dcl_constantbuffer cb5[2045], 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) 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) t11
dcl_resource_texture2d (float,float,float,float) t12
dcl_resource_texture2d (float,float,float,float) t13
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) 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.xyzw
dcl_input_ps linear v2.xyz
dcl_input_ps constant v3.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, v2.xyzx, v2.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v2.xyzx
mad r1.xyzw, v0.xyxy, cb2[45].zwzw, cb2[45].xyxy
mul r2.xy, r1.xyxx, v0.wwww
mov r2.z, v0.w
mov r2.w, l(1.000000)

//Screen space correction, therefore need the '0.5'
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, l(0.5)
add r2.x, r2.x, -r33.w


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