// ---- Created with 3Dmigoto v1.2.35 on Tue Apr 26 22:30:26 2016

cbuffer cbSceneParam : register(b8)
{
  float4 FC_FarClipInfo : packoffset(c0);
  float4 FC_ScreenSize : packoffset(c1);
  float4 FC_DepthComputeParam : packoffset(c2);
  float4 SC_CameraPos : packoffset(c3);
  float4 VC_ClipPlane : packoffset(c4);
  float4x3 FC_MatrixView : packoffset(c5);
  float4x4 FC_MatrixInvViewProj : packoffset(c8);
  float4x4 FC_MatrixInvProj : packoffset(c12);
  float4x4 FC_MatrixProj : packoffset(c16);
  float4x4 FC_MatrixInvView : packoffset(c20);
  float4x4 VC_MatrixViewProj : packoffset(c24);
  float4 FC_ShadowMapParam : packoffset(c28);
  float4 FC_ShadowColor : packoffset(c29);
  float4 FC_ShadowDir : packoffset(c30);
  float4x4 VC_ShadowMapMatrix : packoffset(c31);
  float FC_ShadowDepthRate : packoffset(c35);
  float FC_ShadowDepthScale : packoffset(c35.y);
  float FC_ShadowKernelScale : packoffset(c35.z);
  float FC_ShadowRandTexInvScale : packoffset(c35.w);
  float FC_ShadowTexInvScaleX : packoffset(c36);
  float FC_ShadowTexInvScaleY : packoffset(c36.y);
  float FC_ShadowDepthOffsetScale : packoffset(c36.z);
  float4 FC_ShadowViewKernelScale : packoffset(c37);
  float4x4 FC_ProjSpaceToShadowMatrix[4] : packoffset(c38);
  float4 FC_CascadeSelectDist : packoffset(c54);
  float FC_FrustumNear : packoffset(c55);
  float FC_FrustumSliceScale : packoffset(c55.y);
  float FC_FrustumSliceBias : packoffset(c55.z);
  uint FC_LightTile_Width : packoffset(c56);
  uint FC_LightTile_NumCellX : packoffset(c56.y);
  float4 FC_CloudShadowParam0 : packoffset(c57);
  float4 FC_CloudShadowParam1 : packoffset(c58);
  float FC_ShadowScale0 : packoffset(c59);
  float FC_ShadowScale1 : packoffset(c59.y);
}

cbuffer cbPerScene : register(b0)
{
  float4x4 g_InvProjMatrix : packoffset(c0);
  float4x4 g_ProjSpaceToShadowMatrix[4] : packoffset(c4);
  float4 g_CascadeSelectDist : packoffset(c20);
}

SamplerState SS_WrapPoint_s : register(s6);
SamplerState SS_ClampPoint_s : register(s7);
SamplerComparisonState SS_Shadow_s : register(s12);
Texture2D<float4> g_DepthTexture : register(t1);
Texture2D<float4> g_ShadowTexture : register(t32);
Texture2D<float4> g_DitherTexture : register(t38);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main( 
  float4 v0 : SV_POSITION0,
  float4 v1 : TEXCOORD0,
  float4 v2 : TEXCOORD1,
  out float4 o0 : SV_TARGET0)
{
  const float4 icb[] = { { 1.000000, 0, 0, 0},
                              { 0, 1.000000, 0, 0},
                              { 0, 0, 1.000000, 0},
                              { 0, 0, 0, 1.000000} };
  float4 r0,r1,r2,r3,r4,r5,r6;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = FC_ScreenSize.xy * v1.xy;
  r0.xy = FC_ShadowRandTexInvScale * r0.xy;
  r0.xy = g_DitherTexture.Sample(SS_WrapPoint_s, r0.xy).xz;
  r0.xy = float2(-0.5,-0.5) + r0.xy;
  r0.xy = r0.xy + r0.xy;
  r1.z = g_DepthTexture.Sample(SS_ClampPoint_s, v1.xy).x;
  r2.xyz = float3(65025,255,1) * r1.zzz;
  r1.xy = v2.xy;
  r1.w = 1;
  r3.x = dot(r1.xyzw, g_InvProjMatrix._m00_m10_m20_m30);
  r3.y = dot(r1.xyzw, g_InvProjMatrix._m01_m11_m21_m31);
  r3.z = dot(r1.xyzw, g_InvProjMatrix._m02_m12_m22_m32);
  r3.w = dot(r1.xyzw, g_InvProjMatrix._m03_m13_m23_m33);
  r1.xyz = r3.xyz / r3.www;
  r4.xyz = cmp(g_CascadeSelectDist.xyz < r1.zzz);
  r0.z = dot(r1.xyz, r1.xyz);
  r0.z = sqrt(r0.z);
  r0.z = FC_ShadowMapParam.x + -r0.z;
  r0.z = saturate(FC_ShadowMapParam.y * r0.z);
  r1.xyz = r4.xyz ? float3(1,1,1) : 0;
  r0.w = (int)r1.y + (int)r1.x;
  r0.w = (int)r1.z + (int)r0.w;
  r1.x = dot(FC_ShadowViewKernelScale.xyzw, icb[r0.w+0].xyzw);
  r0.w = (uint)r0.w << 2;
  r1.xyz = FC_ShadowDepthOffsetScale * r1.xxx;
  r4.xz = r1.yz * r0.xy;
  r4.y = r1.z * -r0.y;
  r0.x = dot(float2(6.49399996,1.28100002), r4.xx);
  r0.y = dot(float2(6.49399996,1.28100002), r4.yz);
  r5.x = dot(r3.xyzw, g_ProjSpaceToShadowMatrix[r0.w/4]._m00_m10_m20_m30);
  r5.y = dot(r3.xyzw, g_ProjSpaceToShadowMatrix[r0.w/4]._m01_m11_m21_m31);
  r1.y = dot(r3.xyzw, g_ProjSpaceToShadowMatrix[r0.w/4]._m03_m13_m23_m33);
  r0.w = dot(r3.xyzw, g_ProjSpaceToShadowMatrix[r0.w/4]._m02_m12_m22_m32);
  r0.w = r0.w / r1.y;
  r1.yz = r5.xy / r1.yy;
  r0.xy = r1.yz + r0.xy;
  r0.x = g_ShadowTexture.Sample(SS_ClampPoint_s, r0.xy).x;
  r0.x = min(1, r0.x);
  r3.x = dot(float2(-2.55699992,5.92000008), r4.xx);
  r3.y = dot(float2(-2.55699992,5.92000008), r4.yz);
  r3.xy = r3.xy + r1.yz;
  r0.y = g_ShadowTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r0.x = min(r0.x, r0.y);
  r3.x = dot(float2(3.5480001,-5.03100014), r4.xx);
  r3.y = dot(float2(3.5480001,-5.03100014), r4.yz);
  r3.xy = r3.xy + r1.yz;
  r0.y = g_ShadowTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r0.x = min(r0.x, r0.y);
  r3.y = dot(float2(-1.39699996,-5.52899981), r4.yz);
  r3.x = dot(float2(-1.39699996,-5.52899981), r4.xx);
  r3.xy = r3.xy + r1.yz;
  r0.y = g_ShadowTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r0.x = min(r0.x, r0.y);
  r0.y = saturate(r0.w);
  r0.x = saturate(r0.y + -r0.x);
  r0.x = FC_ShadowDepthScale * r0.x;
  r0.x = FC_ShadowDepthRate * r0.x + -FC_ShadowDepthRate;
  r0.x = 1 + r0.x;
  r0.x = FC_ShadowKernelScale * r0.x;
  r3.xyz = r4.xyz * r0.xxx;
  r0.x = dot(float2(-4.57800007,3.87599993), r3.xx);
  r0.y = dot(float2(-4.57800007,3.87599993), r3.yz);
  r0.xy = r1.yz + r0.xy;
  r4.xyzw = r1.xxxx * float4(0.00564800017,0.00513599999,0.00597700011,0.00592100015) + r0.wwww;
  r0.x = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r0.xy, r4.x).x;
  r0.x = 1 + -r0.x;
  r5.x = dot(float2(-5.15399981,-3.07200003), r3.xx);
  r5.y = dot(float2(-5.15399981,-3.07200003), r3.yz);
  r5.xy = r5.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r5.xy, r4.y).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.x = dot(float2(-2.00399995,-5.65799999), r3.xx);
  r4.y = dot(float2(-2.00399995,-5.65799999), r3.yz);
  r4.xy = r4.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r4.xy, r4.z).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.x = dot(float2(5.96400023,-0.648000002), r3.xx);
  r4.y = dot(float2(5.96400023,-0.648000002), r3.yz);
  r4.xy = r4.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r4.xy, r4.w).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.xyzw = r1.xxxx * float4(0.0058530001,0.00546099991,0.00559599977,0.00511199981) + r0.wwww;
  r5.x = dot(float2(-1.02600002,5.90999985), r3.xx);
  r5.y = dot(float2(-1.02600002,5.90999985), r3.yz);
  r5.xy = r5.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r5.xy, r4.x).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r5.x = dot(float2(4.78800011,3.61199999), r3.xx);
  r5.y = dot(float2(4.78800011,3.61199999), r3.yz);
  r5.xy = r5.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r5.xy, r4.y).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.x = dot(float2(2.86800003,5.26800013), r3.xx);
  r4.y = dot(float2(2.86800003,5.26800013), r3.yz);
  r4.xy = r4.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r4.xy, r4.z).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.x = dot(float2(3.91199994,-4.54799986), r3.xx);
  r4.y = dot(float2(3.91199994,-4.54799986), r3.yz);
  r4.xy = r4.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r4.xy, r4.w).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.xyzw = r1.xxxx * float4(0.00392899988,0.00332699995,0.0031359999,0.00312300003) + r0.wwww;
  r5.xyzw = r1.xxxx * float4(0.001468,0.00179100002,0.00100399996,0.00106699998) + r0.wwww;
  r6.x = dot(float2(-3.81999993,-1.19200003), r3.xx);
  r6.y = dot(float2(-3.81999993,-1.19200003), r3.yz);
  r0.yw = r6.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r0.yw, r4.x).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r6.x = dot(float2(-0.372000009,3.98399997), r3.xx);
  r6.y = dot(float2(-0.372000009,3.98399997), r3.yz);
  r0.yw = r6.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r0.yw, r4.y).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.x = dot(float2(3.86400008,1.03199995), r3.xx);
  r4.y = dot(float2(3.86400008,1.03199995), r3.yz);
  r0.yw = r4.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r0.yw, r4.z).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.x = dot(float2(2.06399989,-3.42799997), r3.xx);
  r4.y = dot(float2(2.06399989,-3.42799997), r3.yz);
  r0.yw = r4.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r0.yw, r4.w).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.x = dot(float2(-1.88600004,0.666000009), r3.xx);
  r4.y = dot(float2(-1.88600004,0.666000009), r3.yz);
  r0.yw = r4.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r0.yw, r5.x).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.x = dot(float2(0.263999999,1.98199999), r3.xx);
  r4.y = dot(float2(0.263999999,1.98199999), r3.yz);
  r0.yw = r4.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r0.yw, r5.y).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.x = dot(float2(-0.0719999969,-1.99800003), r3.xx);
  r4.y = dot(float2(-0.0719999969,-1.99800003), r3.yz);
  r0.yw = r4.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r0.yw, r5.z).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r4.x = dot(float2(1.55400002,-1.25999999), r3.xx);
  r4.y = dot(float2(1.55400002,-1.25999999), r3.yz);
  r0.yw = r4.xy + r1.yz;
  r0.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r0.yw, r5.w).x;
  r0.x = r0.x + -r0.y;
  r0.x = 1 + r0.x;
  r0.x = r0.z * r0.x;
  o0.w = -r0.x * 0.0625 + 1;
  r2.xy = frac(r2.xy);
  o0.yz = -r2.xy * float2(0.00392156886,0.00392156886) + r2.yz;
  o0.x = r2.x;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbSceneParam
// {
//
//   float4 FC_FarClipInfo;             // Offset:    0 Size:    16 [unused]
//   float4 FC_ScreenSize;              // Offset:   16 Size:    16
//   float4 FC_DepthComputeParam;       // Offset:   32 Size:    16 [unused]
//   float4 SC_CameraPos;               // Offset:   48 Size:    16 [unused]
//   float4 VC_ClipPlane;               // Offset:   64 Size:    16 [unused]
//   float4x3 FC_MatrixView;            // Offset:   80 Size:    48 [unused]
//   float4x4 FC_MatrixInvViewProj;     // Offset:  128 Size:    64 [unused]
//   float4x4 FC_MatrixInvProj;         // Offset:  192 Size:    64 [unused]
//   float4x4 FC_MatrixProj;            // Offset:  256 Size:    64 [unused]
//   float4x4 FC_MatrixInvView;         // Offset:  320 Size:    64 [unused]
//   float4x4 VC_MatrixViewProj;        // Offset:  384 Size:    64 [unused]
//   float4 FC_ShadowMapParam;          // Offset:  448 Size:    16
//   float4 FC_ShadowColor;             // Offset:  464 Size:    16 [unused]
//   float4 FC_ShadowDir;               // Offset:  480 Size:    16 [unused]
//   float4x4 VC_ShadowMapMatrix;       // Offset:  496 Size:    64 [unused]
//   float FC_ShadowDepthRate;          // Offset:  560 Size:     4
//   float FC_ShadowDepthScale;         // Offset:  564 Size:     4
//   float FC_ShadowKernelScale;        // Offset:  568 Size:     4
//   float FC_ShadowRandTexInvScale;    // Offset:  572 Size:     4
//   float FC_ShadowTexInvScaleX;       // Offset:  576 Size:     4
//   float FC_ShadowTexInvScaleY;       // Offset:  580 Size:     4
//   float FC_ShadowDepthOffsetScale;   // Offset:  584 Size:     4
//   float4 FC_ShadowViewKernelScale;   // Offset:  592 Size:    16
//   float4x4 FC_ProjSpaceToShadowMatrix[4];// Offset:  608 Size:   256 [unused]
//   float4 FC_CascadeSelectDist;       // Offset:  864 Size:    16 [unused]
//   float FC_FrustumNear;              // Offset:  880 Size:     4 [unused]
//   float FC_FrustumSliceScale;        // Offset:  884 Size:     4 [unused]
//   float FC_FrustumSliceBias;         // Offset:  888 Size:     4 [unused]
//   uint FC_LightTile_Width;           // Offset:  896 Size:     4 [unused]
//   uint FC_LightTile_NumCellX;        // Offset:  900 Size:     4 [unused]
//   float4 FC_CloudShadowParam0;       // Offset:  912 Size:    16 [unused]
//   float4 FC_CloudShadowParam1;       // Offset:  928 Size:    16 [unused]
//   float FC_ShadowScale0;             // Offset:  944 Size:     4 [unused]
//   float FC_ShadowScale1;             // Offset:  948 Size:     4 [unused]
//
// }
//
// cbuffer cbPerScene
// {
//
//   float4x4 g_InvProjMatrix;          // Offset:    0 Size:    64
//   float4x4 g_ProjSpaceToShadowMatrix[4];// Offset:   64 Size:   256
//   float4 g_CascadeSelectDist;        // Offset:  320 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_WrapPoint                      sampler      NA          NA    6        1
// SS_ClampPoint                     sampler      NA          NA    7        1
// SS_Shadow                       sampler_c      NA          NA   12        1
// g_DepthTexture                    texture  float4          2d    1        1
// g_ShadowTexture                   texture  float4          2d   32        1
// g_DitherTexture                   texture  float4          2d   38        1
// cbPerScene                        cbuffer      NA          NA    0        1
// cbSceneParam                      cbuffer      NA          NA    8        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float       
// TEXCOORD                 0   xy          1     NONE   float   xy  
// TEXCOORD                 1   xyzw        2     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_immediateConstantBuffer { { 1.000000, 0, 0, 0},
                              { 0, 1.000000, 0, 0},
                              { 0, 0, 1.000000, 0},
                              { 0, 0, 0, 1.000000} }
dcl_constantbuffer cb8[38], immediateIndexed
dcl_constantbuffer cb0[21], dynamicIndexed
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
dcl_sampler s12, mode_comparison
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t32
dcl_resource_texture2d (float,float,float,float) t38
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xy
dcl_output o0.xyzw
dcl_temps 7
mul r0.xy, v1.xyxx, cb8[1].xyxx
mul r0.xy, r0.xyxx, cb8[35].wwww
sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t38.xzyw, s6
add r0.xy, r0.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
add r0.xy, r0.xyxx, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r1.z, v1.xyxx, t1.yzxw, s7
mul r2.xyz, r1.zzzz, l(65025.000000, 255.000000, 1.000000, 0.000000)
mov r1.xy, v2.xyxx
mov r1.w, l(1.000000)
dp4 r3.x, r1.xyzw, cb0[0].xyzw
dp4 r3.y, r1.xyzw, cb0[1].xyzw
dp4 r3.z, r1.xyzw, cb0[2].xyzw
dp4 r3.w, r1.xyzw, cb0[3].xyzw
div r1.xyz, r3.xyzx, r3.wwww
lt r4.xyz, cb0[20].xyzx, r1.zzzz
dp3 r0.z, r1.xyzx, r1.xyzx
sqrt r0.z, r0.z
add r0.z, -r0.z, cb8[28].x
mul_sat r0.z, r0.z, cb8[28].y
and r1.xyz, r4.xyzx, l(1, 1, 1, 0)
iadd r0.w, r1.y, r1.x
iadd r0.w, r1.z, r0.w
dp4 r1.x, cb8[37].xyzw, icb[r0.w + 0].xyzw
ishl r0.w, r0.w, l(2)
mul r1.xyz, r1.xxxx, cb8[36].zxyz
mul r4.xz, r0.xxyx, r1.yyzy
mul r4.y, -r0.y, r1.z
dp2 r0.x, l(6.494000, 1.281000, 0.000000, 0.000000), r4.xxxx
dp2 r0.y, l(6.494000, 1.281000, 0.000000, 0.000000), r4.yzyy
dp4 r5.x, r3.xyzw, cb0[r0.w + 4].xyzw
dp4 r5.y, r3.xyzw, cb0[r0.w + 5].xyzw
dp4 r1.y, r3.xyzw, cb0[r0.w + 7].xyzw
dp4 r0.w, r3.xyzw, cb0[r0.w + 6].xyzw
div r0.w, r0.w, r1.y
div r1.yz, r5.xxyx, r1.yyyy
add r0.xy, r0.xyxx, r1.yzyy
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t32.xyzw, s7
min r0.x, r0.x, l(1.000000)
dp2 r3.x, l(-2.557000, 5.920000, 0.000000, 0.000000), r4.xxxx
dp2 r3.y, l(-2.557000, 5.920000, 0.000000, 0.000000), r4.yzyy
add r3.xy, r1.yzyy, r3.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.y, r3.xyxx, t32.yxzw, s7
min r0.x, r0.y, r0.x
dp2 r3.x, l(3.548000, -5.031000, 0.000000, 0.000000), r4.xxxx
dp2 r3.y, l(3.548000, -5.031000, 0.000000, 0.000000), r4.yzyy
add r3.xy, r1.yzyy, r3.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.y, r3.xyxx, t32.yxzw, s7
min r0.x, r0.y, r0.x
dp2 r3.y, l(-1.397000, -5.529000, 0.000000, 0.000000), r4.yzyy
dp2 r3.x, l(-1.397000, -5.529000, 0.000000, 0.000000), r4.xxxx
add r3.xy, r1.yzyy, r3.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.y, r3.xyxx, t32.yxzw, s7
min r0.x, r0.y, r0.x
mov_sat r0.y, r0.w
add_sat r0.x, -r0.x, r0.y
mul r0.x, r0.x, cb8[35].y
mad r0.x, cb8[35].x, r0.x, -cb8[35].x
add r0.x, r0.x, l(1.000000)
mul r0.x, r0.x, cb8[35].z
mul r3.xyz, r0.xxxx, r4.xyzx
dp2 r0.x, l(-4.578000, 3.876000, 0.000000, 0.000000), r3.xxxx
dp2 r0.y, l(-4.578000, 3.876000, 0.000000, 0.000000), r3.yzyy
add r0.xy, r0.xyxx, r1.yzyy
mad r4.xyzw, r1.xxxx, l(0.005648, 0.005136, 0.005977, 0.005921), r0.wwww
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t32.xxxx, s12, r4.x
add r0.x, -r0.x, l(1.000000)
dp2 r5.x, l(-5.154000, -3.072000, 0.000000, 0.000000), r3.xxxx
dp2 r5.y, l(-5.154000, -3.072000, 0.000000, 0.000000), r3.yzyy
add r5.xy, r1.yzyy, r5.xyxx
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r5.xyxx, t32.xxxx, s12, r4.y
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r4.x, l(-2.004000, -5.658000, 0.000000, 0.000000), r3.xxxx
dp2 r4.y, l(-2.004000, -5.658000, 0.000000, 0.000000), r3.yzyy
add r4.xy, r1.yzyy, r4.xyxx
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r4.xyxx, t32.xxxx, s12, r4.z
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r4.x, l(5.964000, -0.648000, 0.000000, 0.000000), r3.xxxx
dp2 r4.y, l(5.964000, -0.648000, 0.000000, 0.000000), r3.yzyy
add r4.xy, r1.yzyy, r4.xyxx
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r4.xyxx, t32.xxxx, s12, r4.w
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
mad r4.xyzw, r1.xxxx, l(0.005853, 0.005461, 0.005596, 0.005112), r0.wwww
dp2 r5.x, l(-1.026000, 5.910000, 0.000000, 0.000000), r3.xxxx
dp2 r5.y, l(-1.026000, 5.910000, 0.000000, 0.000000), r3.yzyy
add r5.xy, r1.yzyy, r5.xyxx
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r5.xyxx, t32.xxxx, s12, r4.x
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r5.x, l(4.788000, 3.612000, 0.000000, 0.000000), r3.xxxx
dp2 r5.y, l(4.788000, 3.612000, 0.000000, 0.000000), r3.yzyy
add r5.xy, r1.yzyy, r5.xyxx
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r5.xyxx, t32.xxxx, s12, r4.y
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r4.x, l(2.868000, 5.268000, 0.000000, 0.000000), r3.xxxx
dp2 r4.y, l(2.868000, 5.268000, 0.000000, 0.000000), r3.yzyy
add r4.xy, r1.yzyy, r4.xyxx
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r4.xyxx, t32.xxxx, s12, r4.z
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r4.x, l(3.912000, -4.548000, 0.000000, 0.000000), r3.xxxx
dp2 r4.y, l(3.912000, -4.548000, 0.000000, 0.000000), r3.yzyy
add r4.xy, r1.yzyy, r4.xyxx
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r4.xyxx, t32.xxxx, s12, r4.w
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
mad r4.xyzw, r1.xxxx, l(0.003929, 0.003327, 0.003136, 0.003123), r0.wwww
mad r5.xyzw, r1.xxxx, l(0.001468, 0.001791, 0.001004, 0.001067), r0.wwww
dp2 r6.x, l(-3.820000, -1.192000, 0.000000, 0.000000), r3.xxxx
dp2 r6.y, l(-3.820000, -1.192000, 0.000000, 0.000000), r3.yzyy
add r0.yw, r1.yyyz, r6.xxxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r0.ywyy, t32.xxxx, s12, r4.x
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r6.x, l(-0.372000, 3.984000, 0.000000, 0.000000), r3.xxxx
dp2 r6.y, l(-0.372000, 3.984000, 0.000000, 0.000000), r3.yzyy
add r0.yw, r1.yyyz, r6.xxxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r0.ywyy, t32.xxxx, s12, r4.y
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r4.x, l(3.864000, 1.032000, 0.000000, 0.000000), r3.xxxx
dp2 r4.y, l(3.864000, 1.032000, 0.000000, 0.000000), r3.yzyy
add r0.yw, r1.yyyz, r4.xxxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r0.ywyy, t32.xxxx, s12, r4.z
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r4.x, l(2.064000, -3.428000, 0.000000, 0.000000), r3.xxxx
dp2 r4.y, l(2.064000, -3.428000, 0.000000, 0.000000), r3.yzyy
add r0.yw, r1.yyyz, r4.xxxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r0.ywyy, t32.xxxx, s12, r4.w
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r4.x, l(-1.886000, 0.666000, 0.000000, 0.000000), r3.xxxx
dp2 r4.y, l(-1.886000, 0.666000, 0.000000, 0.000000), r3.yzyy
add r0.yw, r1.yyyz, r4.xxxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r0.ywyy, t32.xxxx, s12, r5.x
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r4.x, l(0.264000, 1.982000, 0.000000, 0.000000), r3.xxxx
dp2 r4.y, l(0.264000, 1.982000, 0.000000, 0.000000), r3.yzyy
add r0.yw, r1.yyyz, r4.xxxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r0.ywyy, t32.xxxx, s12, r5.y
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r4.x, l(-0.072000, -1.998000, 0.000000, 0.000000), r3.xxxx
dp2 r4.y, l(-0.072000, -1.998000, 0.000000, 0.000000), r3.yzyy
add r0.yw, r1.yyyz, r4.xxxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r0.ywyy, t32.xxxx, s12, r5.z
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
dp2 r4.x, l(1.554000, -1.260000, 0.000000, 0.000000), r3.xxxx
dp2 r4.y, l(1.554000, -1.260000, 0.000000, 0.000000), r3.yzyy
add r0.yw, r1.yyyz, r4.xxxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r0.ywyy, t32.xxxx, s12, r5.w
add r0.x, -r0.y, r0.x
add r0.x, r0.x, l(1.000000)
mul r0.x, r0.x, r0.z
mad o0.w, -r0.x, l(0.062500), l(1.000000)
frc r2.xy, r2.xyxx
mad o0.yz, -r2.xxyx, l(0.000000, 0.003922, 0.003922, 0.000000), r2.yyzy
mov o0.x, r2.x
ret 
// Approximately 165 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
