//
// 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
//      = 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_tMisc0                          texture  float4          2d    1        1
// g_tModulation                     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[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_resource_texture2d (float,float,float,float) t2
dcl_input_ps linear v1.xyzw
dcl_output o0.xyzw
dcl_temps 3
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul_sat r0.x, r0.y, l(4.000000)
add_sat r0.y, r0.y, l(-0.250000)
mul r0.y, r0.y, l(1500.000000)
add r0.x, r0.x, l(-0.900000)
mul r0.x, r0.x, l(10.000000)
max r0.x, r0.x, l(0.000000)
sample r1.xyzw, v1.zwzz, t2.xyzw, s1
lt r0.w, l(0.500000), r0.z
if_nz r0.w
  mul r2.xy, v1.zwzz, l(16.000000, 16.000000, 0.000000, 0.000000)
  sample_l r2.xyzw, r2.xyxx, t1.xyzw, s1, l(0.000000)
  add r0.z, r0.z, l(-0.500000)
  mul r0.z, r0.z, l(4.000000)
  min r0.z, r0.z, l(1.000000)
  add r0.w, -r2.x, r0.z
  mul_sat r0.w, r0.w, l(20.000000)
  mad r0.z, -r0.w, r0.z, l(1.000000)
  mul r0.x, r0.z, r0.x
endif 
mad r0.y, r1.w, l(1500.000000), -r0.y
mad_sat r0.y, -r0.y, cb0[2].w, l(1.000000)
mul r0.x, r0.y, r0.x
add r0.yzw, r1.xxyz, l(0.000000, -0.500000, -0.500000, -0.500000)
mad r0.xyz, r0.xxxx, r0.yzwy, l(0.500000, 0.500000, 0.500000, 0.000000)
lt r1.xyz, l(0.500000, 0.500000, 0.500000, 0.000000), r0.xyzx
if_nz r1.x
  add r0.w, -r0.x, l(1.000000)
  add r2.x, r0.w, r0.w
else 
  add r2.x, r0.x, r0.x
endif 
if_nz r1.y
  add r0.x, -r0.y, l(1.000000)
  add r2.y, r0.x, r0.x
else 
  add r2.y, r0.y, r0.y
endif 
if_nz r1.z
  add r0.x, -r0.z, l(1.000000)
  add r2.z, r0.x, r0.x
else 
  add r2.z, r0.z, r0.z
endif 
mov r2.w, l(1.000000)
mov o0.xyzw, r2.xyzw
ret 
// Approximately 47 instruction slots used
