// ---- Created with 3Dmigoto v1.2.57 on Sun May 07 00:37:28 2017

cbuffer MeshBuffer1 : register(b3)
{
  float4 g_Category : packoffset(c0);
  float4 g_UvOffset : packoffset(c1);
  float4 g_ShadowParam : packoffset(c2);
  float4 g_wetLv1 : packoffset(c3);
  float4 g_wetLv2 : packoffset(c4);
  float4 g_UvOffsetDN : packoffset(c5);
}

SamplerState g_Texture0Sampler_s : register(s0);
Texture2D<float4> g_Texture0 : register(t0);


// 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)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = g_UvOffset.xy + v1.xy;
  r0.x = g_Texture0.Sample(g_Texture0Sampler_s, r0.xy).w;
  r0.x = cmp(r0.x < 0.800000012);
  if (r0.x != 0) discard;
  r0.x = ddx_coarse(v2.z);
  r0.y = ddy_coarse(v2.z);
  r0.x = max(abs(r0.x), abs(r0.y));
  r0.x = min(1, r0.x);
  r0.x = r0.x * 3 + v2.z;
  o0.x = 9.99999975e-005 + r0.x;
  o0.yzw = float3(0,0,1);
  
  //discard;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.57 on Sun May 07 00:37:28 2017
//
//
// Buffer Definitions: 
//
// cbuffer MeshBuffer1
// {
//
//   float4 g_Category;                 // Offset:    0 Size:    16 [unused]
//   float4 g_UvOffset;                 // Offset:   16 Size:    16
//   float4 g_ShadowParam;              // Offset:   32 Size:    16 [unused]
//   float4 g_wetLv1;                   // Offset:   48 Size:    16 [unused]
//   float4 g_wetLv2;                   // Offset:   64 Size:    16 [unused]
//   float4 g_UvOffsetDN;               // Offset:   80 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// g_Texture0Sampler                 sampler      NA          NA    0        1
// g_Texture0                        texture  float4          2d    0        1
// MeshBuffer1                       cbuffer      NA          NA    3        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     z 
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb3[2], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.z
dcl_output o0.xyzw
dcl_temps 1
add r0.xy, v1.xyxx, cb3[1].xyxx
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t0.wxyz, s0
lt r0.x, r0.x, l(0.800000)
discard_nz r0.x
deriv_rtx_coarse r0.x, v2.z
deriv_rty_coarse r0.y, v2.z
max r0.x, |r0.y|, |r0.x|
min r0.x, r0.x, l(1.000000)
mad r0.x, r0.x, l(3.000000), v2.z
add o0.x, r0.x, l(0.000100)
mov o0.yzw, l(0,0,0,1.000000)
ret 
// Approximately 12 instruction slots used

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