//
// 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
//   float4 g_vLowDeepColor;            // Offset:   16 Size:    16
//   float4 g_vSandScale;               // Offset:   32 Size:    16
//      = 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 [unused]
//      = 0x3b000000 0x3f800000 0x00000000 0x00000000 
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// MeshTextureSampler                sampler      NA          NA    0        1
// LerpSampler                       sampler      NA          NA    1        1
// MeshTextureSampler                texture  float4          2d    0        1
// g_tSand                           texture  float4          2d    1        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   xyzw        1     NONE   float   xy  
// TEXCOORD                 1   xy          2     NONE   float       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer cb0[3], 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_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 3
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
lt r0.x, r0.y, l(0.250000)
mul r1.xyzw, v1.xyxy, cb0[2].xxyy
sample r2.xyzw, r1.xyxx, t1.xyzw, s1
sample r1.xyzw, r1.zwzz, t1.xyzw, s1
if_nz r0.x
  mul r0.x, r0.y, l(4.000000)
  mad r0.zw, r0.yyyy, l(0.000000, 0.000000, 4.000000, 4.000000), l(0.000000, 0.000000, -0.250000, -0.900000)
  mul r0.z, r0.z, l(4.000000)
  mov_sat r0.z, r0.z
  add r1.x, -r1.w, l(1.000000)
  mad r0.z, r0.z, r1.x, r1.w
  mul r0.x, r0.z, r0.x
  mad r1.xyz, cb0[1].xyzx, r2.xyzx, -cb0[0].xyzx
  mad r1.xyz, r0.xxxx, r1.xyzx, cb0[0].xyzx
  lt r0.x, l(0.000000), cb0[2].z
  if_nz r0.x
    mad r0.x, r0.y, l(4.000000), cb0[2].z
    add r0.x, r0.x, l(-0.900000)
    div_sat r0.x, r0.x, cb0[2].z
    add r2.xyz, -r1.xyzx, r2.xyzx
    mad o0.xyz, r0.xxxx, r2.xyzx, r1.xyzx
  else 
    mov o0.xyz, r1.xyzx
  endif 
  mad r0.x, -r0.w, l(10.000000), l(1.000000)
  min o0.w, r0.x, l(1.000000)
else 
  mov o0.xyzw, l(0,0,0,0)
endif 
ret 
// Approximately 31 instruction slots used
