//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.67 on Mon Jan 01 13:11:47 2018
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   float4 g_vDeepColor;               // Offset:    0 Size:    16 [unused]
//   float4 g_vLowDeepColor;            // Offset:   16 Size:    16 [unused]
//   float4 g_vSandScale;               // Offset:   32 Size:    16 [unused]
//      = 0x41800000 0x40800000 0x00000000 0x3f800000 
//   float4 g_vSlopeScale;              // Offset:   48 Size:    16 [unused]
//      = 0x41800000 0x41800000 0x41800000 0x3c23d70a 
//   float4 g_vSlopeSpecBright;         // Offset:   64 Size:    16 [unused]
//      = 0x00000000 0x00000000 0x00000000 0x00000000 
//   float4 g_vSlopeBump;               // Offset:   80 Size:    16 [unused]
//      = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 
//   float4x4 g_mWorldViewProjection;   // Offset:   96 Size:    64 [unused]
//   float3 g_vTranslate;               // Offset:  160 Size:    12 [unused]
//   float3 scaleConst;                 // Offset:  176 Size:    12 [unused]
//   float4x4 textureRotation;          // Offset:  192 Size:    64 [unused]
//   float4 g_vTexCoords0;              // Offset:  256 Size:    16 [unused]
//   float4 g_vTexCoords1;              // Offset:  272 Size:    16 [unused]
//   float4 worldCoords;                // Offset:  288 Size:    16 [unused]
//   float4 g_vSettings;                // Offset:  304 Size:    16
//      = 0x3b000000 0x3f800000 0x00000000 0x00000000 
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// MeshTextureSamplerWrap            sampler      NA          NA    0        1
// LerpSampler                       sampler      NA          NA    1        1
// MeshTextureSamplerWrap            texture  float4          2d    0        1
// g_tMisc0                          texture  float4          2d    1        1
// g_tTiles                          texture  float4          2d    2        1
// $Globals                          cbuffer      NA          NA    0        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     zw        1     NONE   float     zw
// TEXCOORD                 2   xyzw        2     NONE   float   xyzw
// COLOR                    0   xyzw        3     NONE   float      w
// COLOR                    1   xyzw        4     NONE   float      w
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer cb0[20], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, 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_input_ps linear v1.xy
dcl_input_ps linear v1.zw
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.w
dcl_input_ps linear v4.w
dcl_output o0.xyzw
dcl_temps 4
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
sample_l r1.xyzw, v1.zwzz, t1.xyzw, s1, l(0.000000)
lt r0.x, cb0[19].x, l(0.000100)
if_nz r0.x
  sample r2.xyzw, v1.xyxx, t2.xyzw, s1
  mad r1.xyz, r2.yxzy, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
else 
  mov r2.x, cb0[19].x
  mov r2.y, l(0)
  add r0.xz, r2.xxyx, v1.xxyx
  sample r2.xyzw, r0.xzxx, t0.xyzw, s0
  mov r3.x, v1.x
  add r3.y, v1.y, cb0[19].y
  sample r3.xyzw, r3.xyxx, t0.xyzw, s0
  add r1.y, r0.y, -r2.y
  add r1.x, -r0.y, r3.y
  mov r1.z, l(0.200000)
endif 
mad r0.x, v4.w, l(4.000000), l(-2.000000)
mul r1.xy, r0.xxxx, r1.yxyy
dp3 r0.x, r1.xyzx, r1.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, r1.yxzy
dp2 r1.x, r0.xyxx, v2.xzxx
dp2 r1.z, r0.xyxx, v2.ywyy
mov r1.y, r0.z
mad o0.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
mul r0.x, r0.w, v3.w
mul o0.w, r1.w, r0.x
ret 
// Approximately 30 instruction slots used
