//2b596db17ebbdad4-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Thu Feb 04 22:07:26 2016
//
//
// Buffer Definitions: 
//
// 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
//   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 Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerGenericTrilinearWrap       sampler      NA          NA   11        1
// p_default_Setup_8CD6AD409878073_cp6_Param_texture    texture  float4          2d    0        1
// p_default_Material_n188_n211_Texture_texture    texture  float4          2d    1        1
// p_default_Setup_n7_n77_Texture_texture    texture  float4          2d    2        1
// p_default_Setup_n7_9075B4F026705685_cp2_Param_texture    texture  float4          2d    3        1
// p_default_Setup_6724402023250908_cp0_Param_texture    texture  float4          2d    4        1
// p_default_Setup_n26_Texture_texture    texture  float4          2d    5        1
// p_default_Setup_n7_1BB3530022408697_cp0_Param_texture    texture  float4          2d    6        1
// p_default_Setup_n7_8B09DC7019763283_cp1_Param_texture    texture  float4          2d    7        1
// p_default_Setup_n10_n77_Texture_texture    texture  float4          2d    8        1
// p_default_Setup_n10_1BB3530022408697_cp0_Param_texture    texture  float4          2d    9        1
// p_default_Setup_n10_9075B4F026705685_cp2_Param_texture    texture  float4          2d   10        1
// p_default_Setup_n5_n77_Texture_texture    texture  float4          2d   11        1
// p_default_Setup_n3_1BB3530022408697_cp0_Param_texture    texture  float4          2d   12        1
// p_default_Setup_n3_n77_Texture_texture    texture  float4          2d   13        1
// p_default_Setup_n5_1BB3530022408697_cp0_Param_texture    texture  float4          2d   14        1
// p_default_Setup_n5_9075B4F026705685_cp2_Param_texture    texture  float4          2d   15        1
// p_default_Setup_n4_n77_Texture_texture    texture  float4          2d   16        1
// p_default_Setup_n4_1BB3530022408697_cp0_Param_texture    texture  float4          2d   17        1
// p_default_Setup_n4_9075B4F026705685_cp2_Param_texture    texture  float4          2d   18        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
// 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
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[259], dynamicIndexed
// dcl_constantbuffer cb2[46], immediateIndexed
dcl_constantbuffer cb2[82], immediateIndexed
dcl_constantbuffer cb3[20], immediateIndexed
dcl_sampler s11, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t9
dcl_resource_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) t18
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_temps 14
dcl_temps 16
dcl_resource_texture2d (float,float,float,float) t125
mul r0.xy, v0.xyxx, l(0.250000, 0.250000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t1.xyzw, s11
mov r0.y, v3.x
mad r0.x, r0.x, cb1[r0.y + 3].y, cb1[r0.y + 3].z
add r0.y, -cb1[2].x, l(1.000000)
min r0.x, r0.x, r0.y
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mul r0.xy, v1.xyxx, cb3[6].xyxx
sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t14.xyzw, s11
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mad r0.z, -r0.x, r0.x, l(1.000000)
mad r0.z, -r0.y, r0.y, r0.z
mul r1.xy, r0.xyxx, r0.xyxx
max r0.w, r1.y, r1.x
mul r0.w, r0.w, l(0.0000610351563)
max r0.z, r0.w, r0.z
rsq r0.z, r0.z
mul r0.xy, r0.xyxx, -r0.zzzz
mul r1.xyzw, v1.xyxy, cb3[9].xyzw
sample_indexable(texture2d)(float,float,float,float) r0.zw, r1.xyxx, t17.zwxy, s11
sample_indexable(texture2d)(float,float,float,float) r1.y, r1.zwzz, t15.yxzw, s11
mad r0.zw, r0.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r1.w, -r0.z, r0.z, l(1.000000)
mad r1.w, -r0.w, r0.w, r1.w
mul r2.xy, r0.zwzz, r0.zwzz
max r2.x, r2.y, r2.x
mul r2.x, r2.x, l(0.0000610351563)
max r1.w, r1.w, r2.x
rsq r1.w, r1.w
mul r0.zw, r0.zzzw, -r1.wwww
mul r2.xyzw, v1.zwxy, cb3[7].xyzw
sample_indexable(texture2d)(float,float,float,float) r2.zw, r2.zwzz, t12.zwxy, s11
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)
mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r1.w, -r2.z, r2.z, l(1.000000)
mad r1.w, -r2.w, r2.w, r1.w
mul r3.xy, r2.zwzz, r2.zwzz
max r3.x, r3.y, r3.x
mul r3.x, r3.x, l(0.0000610351563)
max r1.w, r1.w, r3.x
rsq r1.w, r1.w
mul r2.zw, r2.zzzw, -r1.wwww
mul r2.zw, r2.zzzw, cb3[13].wwww
add_sat r1.w, cb3[14].z, cb3[19].z
mul r2.zw, r2.zzzw, r1.wwww
mad r0.zw, r0.zzzw, cb3[19].xxxx, -r2.zzzw
mul r3.xyzw, v1.xyxy, cb3[4].xyzw
sample_indexable(texture2d)(float,float,float,float) r4.y, r3.xyxx, t18.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r3.x, r3.zwzz, t2.yxzw, s11
mov r4.z, l(1.000000)
mul r3.yz, v1.zzwz, cb3[13].xxyx
sample_indexable(texture2d)(float,float,float,float) r5.xyzw, r3.yzyy, t0.xyzw, s11
mad_sat r4.x, r5.x, cb3[13].z, cb3[19].y
dp3_sat r3.y, cb3[2].xyzx, r4.xyzx
mad r0.zw, r3.yyyy, r0.zzzw, r2.zzzw
mad r0.xy, r0.xyxx, cb3[17].yyyy, -r0.zwzz
mad_sat r1.x, r5.y, cb3[16].z, cb3[14].w
mov r1.z, l(1.000000)
dp3_sat r1.x, cb3[0].xyzx, r1.xyzx
mad r0.xy, r1.xxxx, r0.xyxx, r0.zwzz
mul r4.xyzw, v1.xyxy, cb3[12].xyzw
sample_indexable(texture2d)(float,float,float,float) r0.zw, r4.xyxx, t9.zwxy, s11
sample_indexable(texture2d)(float,float,float,float) r1.y, r4.zwzz, t8.xyzw, s11
mad r0.zw, r0.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r1.z, -r0.z, r0.z, l(1.000000)
mad r1.z, -r0.w, r0.w, r1.z
mul r2.zw, r0.zzzw, r0.zzzw
max r2.z, r2.w, r2.z
mul r2.z, r2.z, l(0.0000610351563)
max r1.z, r1.z, r2.z
rsq r1.z, r1.z
mul r0.zw, r0.zzzw, -r1.zzzz
mad r0.zw, r0.zzzw, cb3[0].wwww, -r0.xxxy
mad_sat r4.x, r5.z, cb3[1].w, cb3[2].w
mul r6.xyzw, v1.xyxy, cb3[11].xyzw
sample_indexable(texture2d)(float,float,float,float) r4.y, r6.zwzz, t10.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r1.z, r6.xyxx, t11.xzyw, s11
mov r4.z, l(1.000000)
dp3_sat r2.z, cb3[1].xyzx, r4.xyzx
mad r0.xy, r2.zzzz, r0.zwzz, r0.xyxx
mul r4.xyzw, v1.xyxy, cb3[8].xyzw
sample_indexable(texture2d)(float,float,float,float) r0.zw, r4.zwzz, t6.zwxy, s11
sample_indexable(texture2d)(float,float,float,float) r2.w, r4.xyxx, t7.yzwx, s11
mul r2.w, r2.w, cb3[16].w
mad r0.zw, r0.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r3.z, -r0.z, r0.z, l(1.000000)
mad r3.z, -r0.w, r0.w, r3.z
mul r4.xy, r0.zwzz, r0.zwzz
max r3.w, r4.y, r4.x
mul r3.w, r3.w, l(0.0000610351563)
max r3.z, r3.w, r3.z
rsq r3.z, r3.z
mul r0.zw, r0.zzzw, -r3.zzzz
mad r0.zw, r0.zzzw, cb3[15].zzzz, -r0.xxxy
dp2 r3.z, r2.xyxx, r2.xyxx
add r3.z, -r3.z, l(1.000000)
max r3.z, r3.z, l(0.000000)
sqrt r3.z, r3.z
deriv_rty_fine r4.xyzw, v1.zxwy
deriv_rtx_fine r6.xyzw, v1.zwxy
mul r5.xy, r4.xyxx, r6.ywyy
mad r5.xy, r6.xzxx, r4.zwzz, -r5.xyxx
mov r4.xy, -r6.ywyy
lt r6.xy, r5.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r5.xy, l(0.000000, 0.000000, 0.000000, 0.000000), |r5.xyxx|
movc r6.xy, r6.xyxx, l(-1.000000,-1.000000,0,0), l(1.000000,1.000000,0,0)
mul r4.xyzw, r4.zxwy, r6.xxyy
mad r6.zw, v0.xxxy, cb2[45].zzzw, cb2[45].xxxy
mul r7.xy, r6.zwzz, v0.wwww

//Screen space correction, therefore need the '0.5'
ld_indexable(texture2d)(float,float,float,float) r15.xyzw, l(0, 0, 0, 0), t125.xyzw
add r15.w, v0.w, -r15.y
mul r15.w, r15.w, r15.x
mul r15.w, r15.w, l(0.5)
//MANUALLY FIXED
// SCRIPT CORRECTION
add r7.x, r7.x, -r15.w


mad r6.zw, r6.zzzw, cb2[18].xxxy, cb2[18].zzzw
mul r8.xy, r6.zwzz, v0.wwww
mov r7.z, v0.w



mov r7.w, l(1.000000)
dp4 r3.w, cb2[15].xyzw, r7.xyzw
deriv_rty_fine r9.x, r3.w
deriv_rtx_fine r10.x, r3.w
dp4 r3.w, cb2[16].xyzw, r7.xyzw
dp4 r5.z, cb2[17].xyzw, r7.xyzw
deriv_rty_fine r9.y, r3.w
deriv_rtx_fine r10.y, r3.w
deriv_rty_fine r9.z, r5.z
deriv_rtx_fine r10.z, r5.z
dp3 r3.w, v2.xyzx, v2.xyzx
rsq r3.w, r3.w
mul r7.xyz, r3.wwww, v2.xyzx
dp3 r5.z, r9.xyzx, r7.xyzx
mad r9.xyz, -r5.zzzz, r7.xyzx, r9.xyzx
mul r11.xyz, r4.wwww, r9.xyzx
dp3 r4.w, r10.xyzx, r7.xyzx
mad r10.xyz, -r4.wwww, r7.xyzx, r10.xyzx
mad r11.xyz, r10.xyzx, r4.zzzz, r11.xyzx
dp3 r4.z, r11.xyzx, r11.xyzx
rsq r4.z, r4.z
mul r12.xyz, r4.zzzz, r11.xyzx
movc r11.xyz, r5.yyyy, r12.xyzx, r11.xyzx
mul r12.xyz, r7.zxyz, r11.yzxy
mad r12.xyz, r7.yzxy, r11.zxyz, -r12.xyzx
mul r13.xyz, r7.zxyz, r10.yzxy
mad r13.xyz, r7.yzxy, r10.zxyz, -r13.xyzx
dp3 r4.z, r9.xyzx, r13.xyzx
mul r9.xyz, r4.yyyy, r9.xyzx
mad r4.xyw, r10.xyxz, r4.xxxx, r9.xyxz
lt r4.z, r4.z, l(0.000000)
movc r4.z, r4.z, l(-1.000000), l(1.000000)
mul r5.yz, r4.zzzz, r6.xxyx
mul r6.xyz, r5.zzzz, r12.xyzx
mul r9.xyz, r2.yyyy, r6.xyzx
mad r9.xyz, r2.xxxx, r11.xyzx, r9.xyzx
mad r9.xyz, r3.zzzz, r7.xyzx, r9.xyzx
dp3 r2.x, r9.xyzx, r9.xyzx
rsq r2.x, r2.x
mul r2.x, r2.x, r9.z
mad_sat r2.x, r2.x, l(0.500000), l(0.500000)
mul r2.x, r2.x, r5.w
mad_sat r9.x, r2.x, cb3[15].w, cb3[17].z
mul r10.xyzw, v1.xyxy, cb3[10].xyzw
sample_indexable(texture2d)(float,float,float,float) r9.y, r10.zwzz, t3.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r2.x, r10.xyxx, t13.yxzw, s11
mov r9.z, l(1.000000)
dp3_sat r2.y, cb3[3].xyzx, r9.xyzx
mad r0.xy, r2.yyyy, r0.zwzz, r0.xyxx
mul r0.yzw, r6.xxyz, r0.yyyy
mad r0.xyz, r0.xxxx, r11.xyzx, r0.yzwy
dp3 r0.w, r4.xywx, r4.xywx
rsq r0.w, r0.w
mul r6.xyz, r0.wwww, r4.xywx
movc r4.xyz, r5.xxxx, r6.xyzx, r4.xywx
mul r5.xzw, r4.yyzx, r7.zzxy
mad r5.xzw, r7.yyzx, r4.zzxy, -r5.xxzw
mul r5.xyz, r5.yyyy, r5.xzwx
mul r6.xyzw, v1.xyzw, cb3[5].xyzw
mad r6.zw, cb2[24].xxxx, cb3[6].zzzw, r6.zzzw
sample_indexable(texture2d)(float,float,float,float) r0.w, r6.xyxx, t16.xzwy, s11
sample_indexable(texture2d)(float,float,float,float) r6.xy, r6.zwzz, t4.xyzw, s11
mad r6.xy, r6.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mad r3.z, -r6.x, r6.x, l(1.000000)
mad r3.z, -r6.y, r6.y, r3.z
mul r6.zw, r6.xxxy, r6.xxxy
max r4.w, r6.w, r6.z
mul r4.w, r4.w, l(0.0000610351563)
max r3.z, r3.z, r4.w
rsq r3.z, r3.z
mul r6.xy, r6.xyxx, -r3.zzzz
mul r6.xy, r6.xyxx, cb3[18].wwww
mul r5.xyz, r5.xyzx, r6.yyyy
mad r4.xyz, r6.xxxx, r4.xyzx, r5.xyzx
add r0.xyz, r0.xyzx, r4.xyzx
mad r0.xyz, v2.xyzx, r3.wwww, -r0.xyzx
dp3 r3.z, r0.xyzx, r0.xyzx
rsq r3.z, r3.z
mul o0.xyz, r0.xyzx, r3.zzzz
mov r8.z, v0.w
dp3 r0.x, -r8.xyzx, -r8.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, -r8.xyzx
dp3 r4.z, r0.xyzx, cb2[2].xyzx
dp3 r4.x, r0.xyzx, cb2[0].xyzx
dp3 r4.y, r0.xyzx, cb2[1].xyzx
dp3 r0.x, r4.xyzx, r7.xyzx
mul r0.xy, r7.xyxx, r0.xxxx
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), -r4.xyxx
mul r0.xy, r0.xyxx, cb3[16].yyyy
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t7.yxzw, s11
mul_sat r0.x, r2.w, r0.x
add r0.y, -cb3[15].x, cb3[15].y
mad r0.y, r3.x, r0.y, cb3[15].x
add r0.z, -r0.y, cb3[17].x
mad r0.x, r0.x, r0.z, r0.y
add r0.y, cb3[14].x, -cb3[16].x
mad r0.y, r2.x, r0.y, cb3[16].x
add r0.y, r0.y, l(-1.000000)
mad r0.y, r1.w, r0.y, l(1.000000)
add r0.z, -cb3[18].y, cb3[18].z
mad r0.z, r0.w, r0.z, cb3[18].y
add r0.z, -r0.y, r0.z
mad r0.y, r3.y, r0.z, r0.y
add r0.z, cb3[17].w, -cb3[18].x
mad r0.z, r1.z, r0.z, cb3[18].x
add r0.z, -r0.y, r0.z
mad r0.y, r1.x, r0.z, r0.y
add r0.z, cb3[3].w, -cb3[14].y
mad r0.z, r1.y, r0.z, cb3[14].y
add r0.z, -r0.y, r0.z
mad r0.y, r2.z, r0.z, r0.y
add r0.x, -r0.y, r0.x
mad r0.x, r2.y, r0.x, r0.y
max r0.x, r0.x, l(2.000000)
log r0.x, r0.x
add r0.x, r0.x, l(-1.000000)
mul r0.x, r0.x, l(0.0833333358)
min o0.w, r0.x, l(1.000000)
ret 
// Approximately 234 instruction slots used
