//b18b790847a8ad4d-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Thu Feb 04 22:01:59 2016
//
//
// Buffer Definitions: 
//
// 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 Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerGenericTrilinearWrap       sampler      NA          NA   11        1
// p_default_Setup_n48_Texture_texture    texture  float4          2d    0        1
// p_default_Setup_n42_n77_Texture_texture    texture  float4          2d    1        1
// p_default_Setup_n57_Texture_texture    texture  float4          2d    2        1
// p_default_Setup_n26_Texture_texture    texture  float4          2d    3        1
// p_default_Setup_n16_n148_4DF3FB3016561432_cp3_Param_texture    texture  float4          2d    5        1
// p_default_Setup_n16_n98_Texture_texture    texture  float4          2d    6        1
// p_default_Setup_n16_n143_Texture_texture    texture  float4          2d    7        1
// p_default_Setup_n19_n88_Texture_texture    texture  float4          2d    8        1
// p_default_Setup_n18_n88_Texture_texture    texture  float4          2d    9        1
// p_default_Setup_n18_n77_Texture_texture    texture  float4          2d   11        1
// p_default_Setup_n19_n77_Texture_texture    texture  float4          2d   12        1
// p_default_Setup_n34_470EB2D06866788_cp8_Param_texture    texture  float4          2d   13        1
// p_default_Setup_n52_Texture_texture    texture  float4          2d   14        1
// p_default_Setup_n6_n98_Texture_texture    texture  float4          2d   15        1
// p_default_Setup_n7_Texture_texture    texture  float4          2d   16        1
// p_default_Setup_n1_n77_Texture_texture    texture  float4          2d   17        1
// p_default_Setup_n6_n110_Texture_texture    texture  float4          2d   18        1
// p_default_Setup_n1_n88_Texture_texture    texture  float4          2d   19        1
// p_default_Setup_n1_470EB2D06866788_cp8_Param_texture    texture  float4          2d   20        1
// p_default_Setup_n5_471057409100914_cp8_Param_texture    texture  float4          2d   21        1
// p_default_Setup_n34_n88_Texture_texture    texture  float4          2d   22        1
// p_default_Setup_n6_471057409100914_cp8_Param_texture    texture  float4          2d   23        1
// p_default_Setup_n5_n110_Texture_texture    texture  float4          2d   24        1
// p_default_Setup_n34_n77_Texture_texture    texture  float4          2d   25        1
// p_default_Setup_n5_n98_Texture_texture    texture  float4          2d   26        1
// p_default_Setup_n42_n88_Texture_texture    texture  float4          2d   27        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   xy  
// COLOR                    1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xyzw        3     NONE   float   xy  
// TEXCOORD                 2   xyz         4     NONE   float   xyz 
// PSIZE                    0   x           5     NONE    uint       
//
//
// 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 cb2[46], immediateIndexed
dcl_constantbuffer cb2[82], immediateIndexed
dcl_constantbuffer cb3[27], 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) 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) 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_resource_texture2d (float,float,float,float) t19
dcl_resource_texture2d (float,float,float,float) t20
dcl_resource_texture2d (float,float,float,float) t21
dcl_resource_texture2d (float,float,float,float) t22
dcl_resource_texture2d (float,float,float,float) t23
dcl_resource_texture2d (float,float,float,float) t24
dcl_resource_texture2d (float,float,float,float) t25
dcl_resource_texture2d (float,float,float,float) t26
dcl_resource_texture2d (float,float,float,float) t27
dcl_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.xyz
dcl_output o0.xyzw
// dcl_temps 12
dcl_temps 14
dcl_resource_texture2d (float,float,float,float) t125
mul r0.xyzw, v3.xyxy, cb3[16].zwxy
sample_indexable(texture2d)(float,float,float,float) r0.zw, r0.zwzz, t27.zwxy, s11
sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t26.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.zw, r0.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r1.x, -r0.z, r0.z, l(1.000000)
mad r1.x, -r0.w, r0.w, r1.x
mul r1.yz, r0.zzwz, r0.zzwz
max r1.y, r1.z, r1.y
mul r1.y, r1.y, l(0.0000610351563)
max r1.x, r1.y, r1.x
rsq r1.x, r1.x
mul r0.zw, r0.zzzw, -r1.xxxx
mul r0.zw, r0.zzzw, cb3[1].wwww
mad r1.x, -r0.x, r0.x, l(1.000000)
mad r1.x, -r0.y, r0.y, r1.x
mul r1.yz, r0.xxyx, r0.xxyx
max r1.y, r1.z, r1.y
mul r1.y, r1.y, l(0.0000610351563)
max r1.x, r1.y, r1.x
rsq r1.x, r1.x
mul r0.xy, r0.xyxx, -r1.xxxx
sample_indexable(texture2d)(float,float,float,float) r1.xy, v3.xyxx, t16.xyzw, s11
mad r1.xy, r1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mad r1.z, -r1.x, r1.x, l(1.000000)
mad r1.z, -r1.y, r1.y, r1.z
mul r2.xy, r1.xyxx, r1.xyxx
max r1.w, r2.y, r2.x
mul r1.w, r1.w, l(0.0000610351563)
max r1.z, r1.w, r1.z
rsq r1.z, r1.z
mul r1.xy, r1.xyxx, -r1.zzzz
sample_indexable(texture2d)(float,float,float,float) r1.zw, v3.xyxx, 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 r2.x, -r1.z, r1.z, l(1.000000)
mad r2.x, -r1.w, r1.w, r2.x
mul r2.yz, r1.zzwz, r1.zzwz
max r2.y, r2.z, r2.y
mul r2.y, r2.y, l(0.0000610351563)
max r2.x, r2.y, r2.x
rsq r2.x, r2.x
mul r1.zw, r1.zzzw, -r2.xxxx
mov_sat r2.xy, v1.xyxx
mul r1.zw, r1.zzzw, r2.yyyy
mad r1.xy, r1.xyxx, r2.xxxx, r1.zwzz
add r1.z, r2.y, r2.x
add r1.z, -r1.z, l(1.000000)
mul r2.xyzw, v3.xyxy, cb3[11].zwxy
sample_indexable(texture2d)(float,float,float,float) r2.xy, r2.xyxx, t8.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r2.zw, r2.zwzz, t9.zwxy, s11
mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r2.xy, r2.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mad r1.w, -r2.x, r2.x, l(1.000000)
mad r1.w, -r2.y, r2.y, r1.w
mul r3.xy, r2.xyxx, r2.xyxx
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.xy, r2.xyxx, -r1.wwww
mul r2.xy, r2.xyxx, cb3[25].yyyy
mad r1.xy, r2.xyxx, r1.zzzz, r1.xyxx
mad r0.xy, r0.xyxx, cb3[24].zzzz, -r1.xyxx
mul r3.xyzw, v3.xyxy, cb3[5].xyzw
sample_indexable(texture2d)(float,float,float,float) r4.y, r3.xyxx, t21.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r3.y, r3.zwzz, t20.yxzw, s11
mov r4.z, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r5.xyz, v3.xyxx, t2.xyzw, s11
mad r1.z, r5.x, cb3[24].x, cb3[24].y
mov_sat r6.xyzw, v2.xyzw
mul_sat r4.x, r1.z, r6.x
dp3_sat r1.z, cb3[2].xyzx, r4.xyzx
mad r0.xy, r1.zzzz, r0.xyxx, r1.xyxx
mul r4.xyzw, v3.xyxy, cb3[8].zwxy
sample_indexable(texture2d)(float,float,float,float) r1.xy, r4.zwzz, t15.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r1.w, r4.xyxx, t24.xzwy, s11
mad r1.xy, r1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mad r2.x, -r1.x, r1.x, l(1.000000)
mad r2.x, -r1.y, r1.y, r2.x
mul r4.xy, r1.xyxx, r1.xyxx
max r2.y, r4.y, r4.x
mul r2.y, r2.y, l(0.0000610351563)
max r2.x, r2.y, r2.x
rsq r2.x, r2.x
mul r1.xy, r1.xyxx, -r2.xxxx
mad r1.xy, r1.xyxx, cb3[22].xxxx, -r0.xyxx
mul r4.xyzw, v3.xyxy, cb3[6].xyzw
sample_indexable(texture2d)(float,float,float,float) r7.y, r4.xyxx, t23.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r2.xy, r4.zwzz, t19.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)
mov r7.z, l(1.000000)
mad r3.w, r5.z, cb3[21].z, cb3[21].w
mul_sat r7.x, r3.w, r6.y
dp3_sat r3.w, cb3[3].xyzx, r7.xyzx
mad r0.xy, r3.wwww, r1.xyxx, r0.xyxx
mul r4.xyzw, v3.xyxy, cb3[13].zwxy
sample_indexable(texture2d)(float,float,float,float) r1.xy, r4.xyxx, t6.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r4.x, r4.zwzz, t25.yxzw, s11
mad r1.xy, r1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mad r4.y, -r1.x, r1.x, l(1.000000)
mad r4.y, -r1.y, r1.y, r4.y
mul r4.zw, r1.xxxy, r1.xxxy
max r4.z, r4.w, r4.z
mul r4.z, r4.z, l(0.0000610351563)
max r4.y, r4.z, r4.y
rsq r4.y, r4.y
mul r1.xy, r1.xyxx, -r4.yyyy
mad r1.xy, cb3[19].xxxx, r1.xyxx, -r0.xyxx
mad r4.y, r5.x, cb3[19].w, cb3[19].z
mul_sat r4.z, r5.y, r6.w
mul_sat r4.y, r4.y, r6.z
mad r0.xy, r4.yyyy, r1.xyxx, r0.xyxx
add r1.x, r1.z, r3.w
add r1.x, r4.y, r1.x
min r1.x, r1.x, l(1.000000)
add r1.x, -r1.x, l(1.000000)
mul r5.xyzw, v3.xyxy, cb3[15].zwxy
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r5.xyxx, t0.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r1.y, r5.zwzz, t1.xyzw, s11
mul r5.xyz, r1.xxxx, r6.xyzx
mad_sat r4.w, r5.x, cb3[3].w, cb3[2].w
mad r0.xy, r0.zwzz, r4.wwww, r0.xyxx
mad r0.z, -r2.z, r2.z, l(1.000000)
mad r0.z, -r2.w, r2.w, r0.z
mul r5.xw, r2.zzzw, r2.zzzw
max r0.w, r5.w, r5.x
mul r0.w, r0.w, l(0.0000610351563)
max r0.z, r0.w, r0.z
rsq r0.z, r0.z
mul r0.zw, r2.zzzw, -r0.zzzz
mul r0.zw, r0.zzzw, cb3[18].yyyy
mad_sat r2.z, r5.y, cb3[18].w, cb3[18].z
mad_sat r5.x, r5.z, cb3[21].x, cb3[20].w
mad r0.xy, r0.zwzz, r2.zzzz, r0.xyxx
mul r6.xyzw, v3.xyxy, cb3[14].zwxy
sample_indexable(texture2d)(float,float,float,float) r0.zw, r6.zwzz, t22.zwxy, s11
sample_indexable(texture2d)(float,float,float,float) r2.w, r6.xyxx, t5.yzwx, s11
mul r2.w, r2.w, cb3[17].y
mad r0.zw, r0.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r5.w, -r0.z, r0.z, l(1.000000)
mad r5.w, -r0.w, r0.w, r5.w
mul r6.xy, r0.zwzz, r0.zwzz
max r6.x, r6.y, r6.x
mul r6.x, r6.x, l(0.0000610351563)
max r5.w, r5.w, r6.x
rsq r5.w, r5.w
mul r0.zw, r0.zzzw, -r5.wwww
mul r0.zw, r0.zzzw, cb3[20].zzzz
mul r6.xyzw, v3.xyxy, cb3[9].xyzw
sample_indexable(texture2d)(float,float,float,float) r5.y, r6.zwzz, t13.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r5.w, r6.xyxx, t12.xzwy, s11
mov r5.z, l(1.000000)
dp3_sat r5.x, cb3[1].xyzx, r5.xyzx
mad r0.xy, r0.zwzz, r5.xxxx, r0.xyxx
mad r0.z, -r2.x, r2.x, l(1.000000)
mad r0.z, -r2.y, r2.y, r0.z
mul r5.yz, r2.xxyx, r2.xxyx
max r0.w, r5.z, r5.y
mul r0.w, r0.w, l(0.0000610351563)
max r0.z, r0.w, r0.z
rsq r0.z, r0.z
mul r0.zw, r2.xxxy, -r0.zzzz
mul r0.zw, r0.zzzw, cb3[23].yyyy
mul r6.xyzw, v3.xyxy, cb3[7].zwxy
sample_indexable(texture2d)(float,float,float,float) r2.x, r6.xyxx, t14.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r2.y, r6.zwzz, t18.xyzw, s11
mul r1.x, r1.x, r2.x
mad_sat r3.x, r1.x, cb3[23].w, cb3[23].z
mov r3.z, l(1.000000)
dp3_sat r1.x, cb3[4].xyzx, r3.xyzx
mad r0.xy, r0.zwzz, r1.xxxx, r0.xyxx
deriv_rty_fine r3.xy, v3.xyxx
deriv_rtx_fine r0.zw, v3.xxxy
mul r2.x, r3.x, r0.w
mad r0.z, r0.z, r3.y, -r2.x
mov r3.z, -r0.w
lt r0.w, r0.z, l(0.000000)
lt r0.z, l(0.000000), |r0.z|
movc r0.w, r0.w, l(-1.000000), l(1.000000)
mul r3.xy, r3.yzyy, r0.wwww
mad r5.yz, v0.xxyx, cb2[45].zzwz, cb2[45].xxyx
mul r6.xy, r5.yzyy, 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)
//MANUALLY FIXED
// SCRIPT CORRECTION
add r6.x, r6.x, -r13.w


mad r5.yz, r5.yyzy, cb2[18].xxyx, cb2[18].zzwz
mul r7.xy, r5.yzyy, v0.wwww
mov r6.z, v0.w




mov r6.w, l(1.000000)
dp4 r2.x, cb2[15].xyzw, r6.xyzw
deriv_rty_fine r8.x, r2.x
deriv_rtx_fine r9.z, r2.x
dp4 r2.x, cb2[16].xyzw, r6.xyzw
dp4 r3.z, cb2[17].xyzw, r6.xyzw
deriv_rty_fine r8.y, r2.x
deriv_rtx_fine r9.x, r2.x
deriv_rty_fine r8.z, r3.z
deriv_rtx_fine r9.y, r3.z
dp3 r2.x, v4.xyzx, v4.xyzx
rsq r2.x, r2.x
mul r6.xyz, r2.xxxx, v4.xyzx
dp3 r3.z, r8.xyzx, r6.xyzx
mad r8.xyz, -r3.zzzz, r6.xyzx, r8.xyzx
mul r10.xyz, r3.yyyy, r8.xyzx
dp3 r3.y, r9.zxyz, r6.xyzx
mad r9.xyz, -r3.yyyy, r6.yzxy, r9.xyzx
mad r3.xyz, r9.zxyz, r3.xxxx, r10.xyzx
dp3 r5.y, r3.xyzx, r3.xyzx
rsq r5.y, r5.y
mul r10.xyz, r3.xyzx, r5.yyyy
movc r3.xyz, r0.zzzz, r10.xyzx, r3.xyzx
mul r10.xyz, r3.yzxy, r6.zxyz
mad r10.xyz, r6.yzxy, r3.zxyz, -r10.xyzx
mul r11.xyz, r6.zxyz, r9.xyzx
mad r9.xyz, r6.yzxy, r9.yzxy, -r11.xyzx
dp3 r0.z, r8.xyzx, r9.xyzx
lt r0.z, r0.z, l(0.000000)
movc r0.z, r0.z, l(-1.000000), l(1.000000)
mul r0.z, r0.z, r0.w
mul r8.xyz, r0.zzzz, r10.xyzx
mul r0.yzw, r0.yyyy, r8.xxyz
mad r0.xyz, r0.xxxx, r3.xyzx, r0.yzwy
mad r0.xyz, v4.xyzx, r2.xxxx, -r0.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul o0.xyz, r0.wwww, r0.xyzx
mov r7.z, v0.w
dp3 r0.x, -r7.xyzx, -r7.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, -r7.xyzx
dp3 r3.z, r0.xyzx, cb2[2].xyzx
dp3 r3.x, r0.xyzx, cb2[0].xyzx
dp3 r3.y, r0.xyzx, cb2[1].xyzx
dp3 r0.x, -r3.xyzx, r6.xyzx
add r0.x, r0.x, r0.x
mad r0.xy, r6.xyxx, -r0.xxxx, -r3.xyxx
mul r0.xy, r0.xyxx, cb3[17].zzzz
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t5.yxzw, s11
mul_sat r0.x, r2.w, r0.x
add r0.y, cb3[19].y, -cb3[21].y
mul r6.xyzw, v3.xyxy, cb3[12].zwxy
sample_indexable(texture2d)(float,float,float,float) r0.z, r6.xyxx, t7.xzyw, s11
sample_indexable(texture2d)(float,float,float,float) r0.w, r6.zwzz, t17.xzwy, s11
mad r0.y, r0.z, r0.y, cb3[21].y
add r0.z, -r0.y, l(1.000000)
mad r0.x, r0.x, r0.z, r0.y
add r0.y, cb3[24].w, -cb3[25].x
mad r0.y, r1.w, r0.y, cb3[25].x
add r0.z, cb3[25].z, -cb3[26].x
mad r0.z, r5.w, r0.z, cb3[26].x
add r0.y, -r0.z, r0.y
mad r0.y, r1.z, r0.y, r0.z
add r0.z, -cb3[22].z, cb3[22].y
mad r0.z, r2.y, r0.z, cb3[22].z
add r0.z, -r0.y, r0.z
mad r0.y, r3.w, r0.z, r0.y
add r0.x, -r0.y, r0.x
mad r0.x, r4.y, r0.x, r0.y
add r0.y, cb3[4].w, -cb3[17].x
mad r0.y, r1.y, r0.y, cb3[17].x
add r0.y, -r0.x, r0.y
mad r0.x, r4.w, r0.y, r0.x
mul r0.yz, v3.xxyx, cb3[10].xxyx
sample_indexable(texture2d)(float,float,float,float) r0.y, r0.yzyy, t11.xyzw, s11
add r0.z, -cb3[17].w, cb3[18].x
mad r0.y, r0.y, r0.z, cb3[17].w
add r0.y, -r0.x, r0.y
mad r0.x, r2.z, r0.y, r0.x
add r0.y, -cb3[20].x, cb3[20].y
mad r0.y, r4.x, r0.y, cb3[20].x
add r0.y, -r0.x, r0.y
mad r0.x, r5.x, r0.y, r0.x
add r0.y, -cb3[22].w, cb3[23].x
mad r0.y, r0.w, r0.y, cb3[22].w
add r0.y, -r0.x, r0.y
mad r0.x, r1.x, r0.y, r0.x
mad r0.y, r0.x, cb3[25].w, -r0.x
mad r0.x, r4.z, r0.y, r0.x
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 281 instruction slots used
