//9f992fbc3f44888e-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Sat Feb 13 21:18:55 2016
//
//
// Buffer Definitions: 
//
// 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 DrawableBuffer
// {
//
//   float4 FogColor;                   // Offset:    0 Size:    16 [unused]
//   float4 DebugColor;                 // Offset:   16 Size:    16 [unused]
//   float AlphaThreshold;              // Offset:   32 Size:     4
//   float4 __InstancedMaterialOpacity[256];// Offset:   48 Size:  4096
//
// }
//
// cbuffer SceneBuffer
// {
//
//   row_major float4x4 View;           // Offset:    0 Size:    64
//   row_major float4x4 ScreenMatrix;   // Offset:   64 Size:    64 [unused]
//   float2 DepthExportScale;           // Offset:  128 Size:     8 [unused]
//   float2 __padding0;                 // Offset:  136 Size:     8 [unused]
//   float4 FogParams;                  // Offset:  144 Size:    16 [unused]
//   float3 __CameraPosition;           // Offset:  160 Size:    12 [unused]
//   float __padding12;                 // Offset:  172 Size:     4 [unused]
//   float3 CameraDirection;            // Offset:  176 Size:    12 [unused]
//   float __padding9;                  // Offset:  188 Size:     4 [unused]
//   float3 DepthFactors;               // Offset:  192 Size:    12 [unused]
//   float __padding10;                 // Offset:  204 Size:     4 [unused]
//   float3 ShadowDepthBiasAndLightType;// Offset:  208 Size:    12 [unused]
//   float __padding11;                 // Offset:  220 Size:     4 [unused]
//   float4 SubframeViewport;           // Offset:  224 Size:    16 [unused]
//   row_major float3x4 DepthToWorld;   // Offset:  240 Size:    48
//   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
//   float4 SnowParams02;               // Offset: 1568 Size:    16
//   float4 SnowParams03;               // Offset: 1584 Size:    16
//   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 Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerGenericPointClamp          sampler      NA          NA   10        1
// SamplerGenericTrilinearWrap       sampler      NA          NA   11        1
// SamplerGenericBilinearWrap        sampler      NA          NA   12        1
// SamplerGenericBilinearClamp       sampler      NA          NA   13        1
// p_default_Material_n224_n242_n257_661830C016465534_cp0_Param_texture    texture  float4          2d    0        1
// p_default_Setup_n4_9075B4F026705685_cp2_Param_texture    texture  float4          2d    2        1
// p_default_Setup_n4_n78_Texture_texture    texture  float4          2d    3        1
// p_default_Setup_n28_Texture_texture    texture  float4          2d    5        1
// p_default_Setup_n4_n74_Texture_texture    texture  float4          2d    6        1
// p_default_Setup_n7_9075B4F026705685_cp2_Param_texture    texture  float4          2d    7        1
// p_default_Setup_n4_8B09DC7019763283_cp1_Param_texture    texture  float4          2d    8        1
// p_default_Setup_n7_8B09DC7019763283_cp1_Param_texture    texture  float4          2d    9        1
// p_default_Setup_8CD6AD409878073_cp6_Param_texture    texture  float4          2d   10        1
// p_default_Material_n210_n230_Texture_texture    texture  float4          2d   11        1
// p_default_Material_n219_NormalBufferTexture_texture    texture  float4          2d   12        1
// p_default_Setup_n3_8B09DF1018700059_cp0_Param_texture    texture  float4          2d   13        1
// p_default_Setup_n7_n78_Texture_texture    texture  float4          2d   14        1
// p_default_Setup_n18_n182_Texture_texture    texture  float4          2d   15        1
// p_default_Setup_n18_45BC9410321659_Param_texture    texture  float4          2d   16        1
// p_default_Setup_n18_n185_Texture_texture    texture  float4          2d   17        1
// p_default_Setup_n3_n78_Texture_texture    texture  float4          2d   19        1
// p_default_Setup_n7_n74_Texture_texture    texture  float4          2d   20        1
// p_default_Setup_n3_n74_Texture_texture    texture  float4          2d   21        1
// LightAccumulation_texture         texture  float4          2d   51        1
// SpecularAccumulation_texture      texture  float4          2d   52        1
// AmbientAccumulation_texture       texture  float4          2d   53        1
// WorldBuffer                       cbuffer      NA          NA    0        1
// DrawableBuffer                    cbuffer      NA          NA    1        1
// SceneBuffer                       cbuffer      NA          NA    2        1
// MaterialBuffer                    cbuffer      NA          NA    3        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   
// COLOR                    1   xyzw        2     NONE   float   x   
// TEXCOORD                 0   xyzw        3     NONE   float   xy  
// TEXCOORD                 1   xyzw        4     NONE   float     z 
// TEXCOORD                 2   xyz         5     NONE   float   xyz 
// PSIZE                    0   x           6     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 cb0[2045], dynamicIndexed
dcl_constantbuffer cb1[259], dynamicIndexed
dcl_constantbuffer cb2[100], immediateIndexed
dcl_constantbuffer cb3[29], immediateIndexed
dcl_sampler s10, mode_default
dcl_sampler s11, mode_default
dcl_sampler s12, mode_default
dcl_sampler s13, mode_default
dcl_resource_texture2d (float,float,float,float) t0
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) 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) t19
dcl_resource_texture2d (float,float,float,float) t20
dcl_resource_texture2d (float,float,float,float) t21
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_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps linear v1.x
dcl_input_ps linear v2.x
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.z
dcl_input_ps linear v5.xyz
dcl_input_ps constant v6.x
dcl_output o0.xyzw
dcl_output o1.x
// dcl_temps 15
dcl_temps 17
dcl_resource_texture2d (float,float,float,float) t125
dp3 r0.x, v5.xyzx, v5.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v5.xyzx
mad r1.xyzw, v0.xyxy, cb2[45].zwzw, cb2[45].xyxy
mul r2.xyzw, r1.xyzw, v0.wwww
mov r3.xy, r2.xyxx
mov r3.z, v0.w

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


mov r3.w, l(1.000000)
dp4 r4.x, cb2[15].xyzw, r3.xyzw
dp4 r4.y, cb2[16].xyzw, r3.xyzw
dp4 r4.z, cb2[17].xyzw, r3.xyzw
mad r1.xy, r1.zwzz, cb2[18].xyxx, cb2[18].zwzz
mul r5.xy, r1.xyxx, v0.wwww
mov r5.z, v0.w

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


dp3 r0.w, -r5.xyzx, -r5.xyzx
rsq r0.w, r0.w
mul r5.xyz, r0.wwww, -r5.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
deriv_rty_fine r5.xy, v3.xyxx
deriv_rtx_fine r1.xy, v3.xyxx
mov r3.xy, r2.zwzz
dp4 r0.w, cb2[15].xyzw, r3.xyzw
dp4 r2.x, cb2[16].xyzw, r3.xyzw
dp4 r2.y, cb2[17].xyzw, r3.xyzw
deriv_rty_fine r3.y, r0.w
deriv_rty_fine r3.xz, r2.yyxy
deriv_rtx_fine r7.x, r0.w
deriv_rtx_fine r7.yz, r2.xxyx
mul r2.xyzw, v3.xyxy, cb3[22].zwxy
mul r8.xyzw, v3.xyxy, cb3[23].zwxy
sample_indexable(texture2d)(float,float,float,float) r2.xy, r2.xyxx, t5.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)
dp2 r0.w, r2.xyxx, r2.xyxx
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, l(0.000000)
sqrt r0.w, r0.w
sample_indexable(texture2d)(float,float,float,float) r3.w, r8.xyxx, t10.xyzw, s11
dp3 r4.w, r7.xyzx, r0.xyzx
mad r9.xyz, -r4.wwww, r0.yzxy, r7.yzxy
dp3 r4.w, r3.yzxy, r0.xyzx
mad r10.xyz, -r4.wwww, r0.xyzx, r3.yzxy
mul r4.w, r5.x, r1.y
mad r4.w, r1.x, r5.y, -r4.w
lt r5.w, r4.w, l(0.000000)
movc r5.w, r5.w, l(-1.000000), l(1.000000)
mov r5.z, -r1.y
mul r8.xy, r5.yzyy, r5.wwww
mul r11.xyz, r8.yyyy, r10.xyzx
mad r11.xyz, r9.zxyz, r8.xxxx, r11.xyzx
lt r4.w, l(0.000000), |r4.w|
dp3 r5.z, r11.xyzx, r11.xyzx
rsq r5.z, r5.z
mul r12.xyz, r5.zzzz, r11.xyzx
movc r11.xyz, r4.wwww, r12.xyzx, r11.xyzx
mul r12.xyz, r0.zxyz, r11.yzxy
mad r12.xyz, r0.yzxy, r11.zxyz, -r12.xyzx
mul r13.xyz, r0.zxyz, r9.xyzx
mad r9.xyz, r0.yzxy, r9.yzxy, -r13.xyzx
dp3 r4.w, r10.xyzx, r9.xyzx
lt r4.w, r4.w, l(0.000000)
movc r4.w, r4.w, l(-1.000000), l(1.000000)
mul r4.w, r4.w, r5.w
mul r9.xyz, r4.wwww, r12.xyzx
mul r10.xyz, r0.zxyz, r7.yzxy
mad r10.xyz, r0.yzxy, r7.zxyz, -r10.xyzx
mul r12.xyz, r0.yzxy, r3.xyzx
mad r3.xyz, r3.zxyz, r0.zxyz, -r12.xyzx
dp3 r8.x, r3.xyzx, r6.xyzx
dp3 r8.y, r10.xyzx, r6.xyzx
dp3 r3.x, r7.xyzx, r3.xyzx
div r3.xy, r8.xyxx, r3.xxxx
mul r3.yz, r5.xxyx, r3.yyyy
mad r1.xy, r3.xxxx, r1.xyxx, r3.yzyy
mul r3.xyz, r2.yyyy, r9.xyzx
mad r3.xyz, r2.xxxx, r11.xyzx, r3.xyzx
mad r3.xyz, r0.wwww, r0.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)
sample_indexable(texture2d)(float,float,float,float) r2.x, v3.xyxx, t13.xyzw, s11
add r2.x, r2.x, l(-0.500000)
mul r2.x, r2.x, cb3[26].x
mul r1.xy, r1.xyxx, cb3[20].zwzz
add_sat r2.y, cb3[26].y, cb3[26].z
mad r3.xy, r1.xyxx, r2.xxxx, v3.xyxx
mul r3.xy, r3.xyxx, cb3[19].zwzz
sample_indexable(texture2d)(float,float,float,float) r3.x, r3.xyxx, t19.xyzw, s11
mad r1.xy, r1.xyxx, r2.xxxx, r2.zwzz
sample_indexable(texture2d)(float,float,float,float) r2.xzw, r1.xyxx, t21.xwyz, s11
mul r3.xyz, r3.xxxx, cb3[4].xyzx
mul r2.xzw, r2.xxzw, cb3[1].xxyz
add r1.x, cb3[27].x, l(-1.000000)
mad r1.x, r2.y, r1.x, l(1.000000)
mul r5.xyz, r2.yyyy, cb3[8].xyzx
mul r7.xyz, r2.yyyy, r3.xyzx
mul r2.xzw, r2.xxzw, r2.yyyy
mul r0.w, r0.w, r3.w
ishl r1.y, v6.x, l(3)
dp3 r1.y, cb0[r1.y + 4].xyzx, cb0[r1.y + 4].xyzx
sqrt r1.y, r1.y
dp3 r3.w, r6.xyzx, r0.xyzx
mul r8.xy, r0.xyxx, r3.wwww
mad r8.xy, r8.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), -r6.xyxx
mul r9.xy, r1.yyyy, v3.xyxx
mul r9.zw, v3.xxxy, cb3[16].zzzw
mul r10.xy, v3.xyxx, cb3[15].xyxx
mul r10.xy, r1.yyyy, r10.xyxx
mul r10.zw, r8.xxxy, cb3[24].zzzz
sample_indexable(texture2d)(float,float,float,float) r3.w, r9.zwzz, t8.yzwx, s11
mul r11.xyzw, r9.xyxy, cb3[18].zwxy
mul r9.zw, r9.xxxy, cb3[16].xxxy
sample_indexable(texture2d)(float,float,float,float) r9.zw, r9.zwzz, t3.zwxy, s11
sample_indexable(texture2d)(float,float,float,float) r12.y, r10.xyxx, t2.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r13.xyz, r11.xyxx, t6.xyzw, s11
mul r3.w, r3.w, cb3[14].w
mul r14.xyz, r9.zzzz, cb3[12].xyzx
add r4.w, -cb3[25].w, cb3[25].z
mad r4.w, r9.w, r4.w, cb3[25].w
sample_indexable(texture2d)(float,float,float,float) r5.w, r10.zwzz, t8.xzwy, s11
mul_sat r3.w, r3.w, r5.w
mad r10.xyz, -cb3[12].xyzx, r9.zzzz, cb3[10].xyzx
mad r10.xyz, r3.wwww, r10.xyzx, r14.xyzx
add r5.w, -r4.w, cb3[13].w
mad r3.w, r3.w, r5.w, r4.w
mad_sat r12.x, r0.w, cb3[24].w, cb3[11].w
mov r12.z, l(1.000000)
dp3_sat r0.w, cb3[5].xyzx, r12.xyzx
mad r12.xyz, -r2.yyyy, cb3[8].xyzx, cb3[6].xyzx
mad r5.xyz, r0.wwww, r12.xyzx, r5.xyzx
mad r12.xyz, r13.xyzx, cb3[2].xyzx, -r2.xzwx
mad r2.xzw, r0.wwww, r12.xxyz, r2.xxzw
mad r3.xyz, -r2.yyyy, r3.xyzx, r10.xyzx
mad r3.xyz, r0.wwww, r3.xyzx, r7.xyzx
add r2.y, -r1.x, r3.w
mad r0.w, r0.w, r2.y, r1.x
mul r7.xy, r8.xyxx, cb3[6].wwww
mul r7.zw, v3.xxxy, cb3[21].xxxy
mul r1.xy, r1.yyyy, r7.zwzz
sample_indexable(texture2d)(float,float,float,float) r2.y, r8.zwzz, t9.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r8.y, r1.xyxx, t7.yxzw, s11
mul r1.xy, r9.xyxx, cb3[20].xyxx
sample_indexable(texture2d)(float,float,float,float) r1.xy, r1.xyxx, t14.xyzw, s11
mad_sat r8.x, v1.x, cb3[7].w, cb3[5].w
mul r2.y, r2.y, cb3[4].w
sample_indexable(texture2d)(float,float,float,float) r9.xyz, r11.zwzz, t20.xyzw, s11
mul r10.xyz, r1.xxxx, cb3[3].xyzx
add r3.w, cb3[9].w, -cb3[10].w
mad r1.y, r1.y, r3.w, cb3[10].w
sample_indexable(texture2d)(float,float,float,float) r3.w, r7.xyxx, t9.xzwy, s11
mov r8.z, l(1.000000)
dp3_sat r4.w, cb3[13].xyzx, r8.xyzx
mul_sat r2.y, r2.y, r3.w
mad r7.xyz, -cb3[3].xyzx, r1.xxxx, cb3[14].xyzx
mad r7.xyz, r2.yyyy, r7.xyzx, r10.xyzx
add r1.x, -r1.y, cb3[3].w
mad r1.x, r2.y, r1.x, r1.y
add r8.xyz, -r5.xyzx, cb3[11].xyzx
mad r5.xyz, r4.wwww, r8.xyzx, r5.xyzx
mad r8.xyz, r9.xyzx, cb3[0].xyzx, -r2.xzwx
mad r2.xyz, r4.wwww, r8.xyzx, r2.xzwx
add r7.xyz, -r3.xyzx, r7.xyzx
mad r3.xyz, r4.wwww, r7.xyzx, r3.xyzx
add r1.x, -r0.w, r1.x
mad r0.w, r4.w, r1.x, r0.w
mul r1.xy, v3.xyxx, cb3[17].xyxx
sample_indexable(texture2d)(float,float,float,float) r7.xyz, r1.xyxx, t17.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r8.xyz, r1.xyxx, t15.xyzw, s11
mul r9.xyz, r8.xyzx, cb3[7].xyzx
add r1.xy, cb2[98].xyxx, l(3072.000000, 3072.000000, 0.000000, 0.000000)
add_sat r10.xyz, r4.xyzx, -cb2[98].xyzx
mul r2.w, r10.y, r10.x
mul r2.w, r10.z, r2.w
eq r2.w, r2.w, l(0.000000)
add_sat r1.xy, -r4.xyxx, r1.xyxx
mul r1.x, r1.y, r1.x
eq r1.x, r1.x, l(0.000000)
or r1.x, r1.x, r2.w
mul r4.zw, r4.xxxy, l(0.000000, 0.000000, 0.000325520843, 0.000325520843)
mad r10.xyzw, r4.xyxy, l(0.000325520843, 0.000325520843, 0.000325520843, 0.000325520843), l(-0.000488281250, -0.000000, 0.000488281250, 0.000000)
mad r11.xyzw, r4.xyxy, l(0.000325520843, 0.000325520843, 0.000325520843, 0.000325520843), l(-0.000000, -0.000488281250, 0.000000, 0.000488281250)
sample_indexable(texture2d)(float,float,float,float) r4.xy, r10.xyxx, t16.xyzw, s12
sample_indexable(texture2d)(float,float,float,float) r10.xy, r10.zwzz, t16.xyzw, s12
sample_indexable(texture2d)(float,float,float,float) r10.zw, r11.xyxx, t16.zwxy, s12
sample_indexable(texture2d)(float,float,float,float) r11.xw, r11.zwzz, t16.yzwx, s12
sample_indexable(texture2d)(float,float,float,float) r4.zw, r4.zwzz, t16.zwxy, s12
if_z r1.x
  add r1.x, v4.z, -cb2[98].z
  mov r12.x, r4.y
  mov r12.yz, r10.yywy
  mov r12.w, r11.x
  mad r12.xyzw, r12.xyzw, l(8192.000000, 8192.000000, 8192.000000, 8192.000000), cb2[99].xxxx
  mov r11.x, r4.x
  mov r11.yz, r10.xxzx
  mad r10.xyzw, r11.xyzw, l(1024.000000, 1024.000000, 1024.000000, 1024.000000), cb2[99].yyyy
  mad r4.xy, r4.wzww, l(8192.000000, 1024.000000, 0.000000, 0.000000), cb2[99].xyxx
  add r10.xyzw, -r10.xyzw, r12.xyzw
  add r11.xyzw, r1.xxxx, -r10.xyzw
  add r1.y, r10.y, r10.x
  add r1.y, r10.z, r1.y
  add r1.y, r10.w, r1.y
  mad r10.xyzw, -r1.yyyy, l(0.250000, 0.250000, 0.250000, 0.250000), r10.xyzw
  add_sat r10.xyzw, r10.xyzw, cb2[99].wwww
  mov_sat r12.xyzw, r11.xyzw
  mul r4.zw, r12.zzzw, r12.xxxy
  mul r1.y, r4.w, r4.z
  eq r1.y, r1.y, l(0.000000)
  add_sat r11.xyzw, -r11.xyzw, l(150.000000, 150.000000, 150.000000, 150.000000)
  mul r4.zw, r11.zzzw, r11.xxxy
  mul r2.w, r4.w, r4.z
  eq r2.w, r2.w, l(0.000000)
  or r1.y, r1.y, r2.w
  mul r4.zw, r10.zzzw, r10.xxxy
  mul r2.w, r4.w, r4.z
  eq r2.w, r2.w, l(0.000000)
  or r1.y, r1.y, r2.w
  add r2.w, -r4.y, r4.x
  add r1.x, r1.x, -r2.w
  mul r2.w, r1.x, l(0.400000)
  mul r3.w, r1.x, cb2[97].x
  sqrt r3.w, r3.w
  mul r4.x, r4.y, cb2[97].x
  sqrt r4.x, r4.x
  add r3.w, -r3.w, r4.x
  mul r3.w, r3.w, cb2[97].y
  mul r3.w, r3.w, l(3.000000)
  div_sat r2.w, r3.w, r2.w
  div_sat r1.x, r4.y, r1.x
  add r1.x, r2.w, r1.x
  movc r1.x, r1.y, l(2.000000), r1.x
else 
  mov r1.x, l(2.000000)
endif 
lt r1.y, r1.x, l(2.000000)
and r2.w, r1.y, l(0x3f800000)
mul r2.w, r2.w, v2.x
mul r1.x, r1.x, l(0.500000)
mad r4.xyz, -cb3[7].xyzx, r8.xyzx, r7.xyzx
mad r4.xyz, r1.xxxx, r4.xyzx, r9.xyzx
add r7.xyz, r2.xyzx, -r4.xyzx
mad r4.xyz, r1.xxxx, r7.xyzx, r4.xyzx
movc r4.xyz, r1.yyyy, r4.xyzx, r2.xyzx
add r4.xyz, -r2.xyzx, r4.xyzx
mad r2.xyz, v2.xxxx, r4.xyzx, r2.xyzx
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r1.zwzz, t51.xyzw, s13
sample_indexable(texture2d)(float,float,float,float) r7.xyz, r1.zwzz, t52.xyzw, s13
sample_indexable(texture2d)(float,float,float,float) r8.xyz, r1.zwzz, t12.xyzw, s10
mul r1.xy, v0.xyxx, l(0.250000, 0.250000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t11.xyzw, s11
mov r1.y, v6.x
mad r1.x, r1.x, cb1[r1.y + 3].y, cb1[r1.y + 3].z
add r0.w, r0.w, l(2.000000)
mul r0.w, r0.w, l(0.010000)
mul r9.xyz, r0.wwww, r3.xyzx
add r4.xyz, r5.xyzx, r4.xyzx
sample_indexable(texture2d)(float,float,float,float) r0.w, r1.zwzz, t0.yzwx, s10
add r1.y, cb3[27].z, cb3[27].y
add_sat r1.y, -r1.y, l(1.000000)
mul r1.z, r0.w, r0.w
mad r0.w, cb3[27].y, r0.w, r1.y
mad_sat r0.w, r1.z, cb3[27].z, r0.w
add r1.yzw, -cb3[9].xxyz, l(0.000000, 1.000000, 1.000000, 1.000000)
mad_sat r1.yzw, r0.wwww, r1.yyzw, cb3[9].xxyz
add_sat r0.w, -cb3[27].w, l(1.000000)
mad_sat r5.xyz, r1.yzwy, cb3[27].wwww, r0.wwww
add r5.xyz, -r1.yzwy, r5.xyzx
mad r1.yzw, r2.wwww, r5.xxyz, r1.yyzw
ftoi r5.xy, v0.xyxx
mov r5.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r5.xyz, r5.xyzw, t53.xyzw
mul r7.xyz, r7.xyzx, r1.yzwy
add r4.xyz, r4.xyzx, r5.xyzx
mul r4.xyz, r1.yzwy, r4.xyzx
dp3 r0.w, r8.xyzx, r6.xyzx
max r1.z, r0.w, l(1.000000012E-007)
add r1.z, -r1.z, l(1.000000)
mul r1.w, r1.z, r1.z
mul r1.w, r1.w, r1.w
mul r1.z, r1.z, r1.w
mad r1.z, r1.z, l(0.960000), l(0.040000)
mul r5.xyz, r8.xyzx, r0.wwww
mad r5.xyz, r5.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r6.xyzx
dp3 r0.w, r3.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
dp3 r0.x, r5.xyzx, r0.xyzx
mad_sat r0.x, cb3[28].x, r0.x, l(1.000000)
mul r0.x, r0.x, r0.x
mul r3.xyz, r9.xyzx, r7.xyzx
mul r0.y, r1.z, r1.y
mul r0.x, r0.x, r0.y
mul r0.x, r0.w, r0.x
mad r0.yzw, r4.xxyz, r2.xxyz, r3.xxyz
max o0.xyz, r0.yzwy, l(0.000000, 0.000000, 0.000000, 0.000000)
mul_sat r0.x, r0.x, l(0.250000)
sqrt o1.x, r0.x
add r0.x, -cb1[2].x, l(1.000000)
min r0.x, r1.x, r0.x
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mov o0.w, l(1.000000)
ret 
// Approximately 302 instruction slots used
