//
// 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
//      = 0x41800000 0x41800000 0x41800000 0x3c23d70a 
//   float4 g_vSlopeSpecBright;         // Offset:   64 Size:    16
//      = 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
// LerpSamplerDetailed               sampler      NA          NA    2        1
// MeshTextureSampler                texture  float4          2d    0        1
// g_tMisc0                          texture  float4          2d    1        1
// g_tSnow0                          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   xyzw        1     NONE   float   xyzw
// 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[5], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, 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.xyzw
dcl_output o0.xyzw
dcl_temps 4
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul r0.xy, v1.zwzz, l(16.000000, 16.000000, 0.000000, 0.000000)
sample_l r1.xyzw, r0.xyxx, t1.xyzw, s1, l(0.000000)
lt r2.xyzw, l(0.010000, 0.250000, 0.500000, 0.750000), r0.zzzz
if_nz r2.x
  mul r0.x, r0.z, l(4.000000)
  min r0.x, r0.x, l(1.000000)
  add r0.y, -r1.x, r0.x
  mul_sat r0.y, r0.y, l(20.000000)
  mul r0.x, r0.x, r0.y
  mov r0.y, cb0[4].x
else 
  mov r0.xy, l(0,0,0,0)
endif 
if_nz r2.y
  add r0.w, r0.z, l(-0.250000)
  mul r0.w, r0.w, l(4.000000)
  min r0.w, r0.w, l(1.000000)
  add r1.y, -r1.x, r0.w
  mul_sat r1.y, r1.y, l(20.000000)
  mul r0.w, r0.w, r1.y
  add r1.y, -r0.y, cb0[4].y
  mad r0.y, r1.y, r0.w, r0.y
endif 
if_nz r2.z
  add r0.w, r0.z, l(-0.500000)
  mul r0.w, r0.w, l(4.000000)
  min r0.w, r0.w, l(1.000000)
  add r1.y, -r1.x, r0.w
  mul_sat r1.y, r1.y, l(20.000000)
  mul r0.w, r0.w, r1.y
  add r1.y, -r0.y, cb0[4].z
  mad r0.y, r1.y, r0.w, r0.y
  mul r2.x, r0.w, l(0.500000)
else 
  mov r2.x, l(0)
endif 
mul r1.yz, v1.zzwz, cb0[3].zzzz
sample r3.xyzw, r1.yzyy, t2.xyzw, s2
if_nz r2.w
  add r0.w, r0.z, l(-0.750000)
  mul r0.w, r0.w, l(8.000000)
  min r0.w, r0.w, l(1.000000)
  add r1.y, -r1.x, r0.w
  mul_sat r1.y, r1.y, l(20.000000)
  add r0.w, r0.w, l(0.250000)
  min r0.w, r0.w, l(1.000000)
  mul r0.w, r0.w, r1.y
  dp3 r1.y, r3.xyzx, l(0.333000, 0.333000, 0.333000, 0.000000)
  mul r1.y, r1.y, r1.y
  mul r1.y, r1.y, r1.y
  mul r0.w, r0.w, r1.y
  add r1.y, -r0.y, cb0[4].w
  mad r0.y, r1.y, r0.w, r0.y
  add r1.y, -r2.x, l(1.000000)
  mad r2.x, r1.y, r0.w, r2.x
endif 
lt r0.w, l(0.875000), r0.z
if_nz r0.w
  add r0.z, r0.z, l(-0.875000)
  mul r0.z, r0.z, l(8.000000)
  min r0.z, r0.z, l(1.000000)
  add r0.w, -r1.x, r0.z
  mul_sat r0.w, r0.w, l(20.000000)
  add r0.z, r0.z, l(0.250000)
  min r0.z, r0.z, l(1.000000)
  mul r0.z, r0.z, r0.w
  add r0.w, -r0.y, cb0[4].w
  mad r0.y, r0.w, r0.z, r0.y
  add r0.w, -r2.x, l(1.000000)
  mad r2.x, r0.w, r0.z, r2.x
endif 
mul r2.y, r0.x, r0.y
mov o0.xyzw, r2.xxxy
ret 
// Approximately 75 instruction slots used
