//another water???
// ---- Created with 3Dmigoto v1.2.62 on Fri Jul 21 17:22:44 2017
cbuffer cb2 : register(b2)
{
  float4 cb2[16];
}

cbuffer cb1 : register(b1)
{
  float4 cb1[6];
}

cbuffer cb0 : register(b0)
{
  float4 cb0[14];
}




// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main( 
  float4 v0 : POSITION0,
  float4 v1 : TANGENT0,
  float3 v2 : NORMAL0,
  float4 v3 : TEXCOORD0,
  float4 v4 : TEXCOORD1,
  float4 v5 : TEXCOORD2,
  float4 v6 : TEXCOORD3,
  float4 v7 : COLOR0,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : TEXCOORD0,
  out float4 o2 : TEXCOORD1,
  out float4 o3 : TEXCOORD2,
  out float4 o4 : TEXCOORD3,
  out float4 o5 : TEXCOORD4)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;
  
float4 stereo = StereoParams.Load(0);
float separation = stereo.x, convergence = stereo.y, eye = stereo.z;

  r0.xyzw = cb2[1].xyzw * v0.yyyy;
  r0.xyzw = cb2[0].xyzw * v0.xxxx + r0.xyzw;
  r0.xyzw = cb2[2].xyzw * v0.zzzz + r0.xyzw;
  r0.xyzw = cb2[3].xyzw * v0.wwww + r0.xyzw;
  o0.xyzw = r0.xyzw;
  
// Automatic vertex shader halo fix inserted with DarkStarSword's hlsltool.py:
// hlsltool.py --install-to c:\py\1 --auto-fix-vertex-halo --only-autofixed --no-validate --ignore-other-errors e7f37098bc9bd4ea-vs_replace.txt
if (r0.w != 1.0) { r0.x += separation * (r0.w - convergence); }

  o1.xyzw = float4(0,1,0,1);
  r1.xyz = cb2[13].xyz * v0.yyy;
  r1.xyz = cb2[12].xyz * v0.xxx + r1.xyz;
  r1.xyz = cb2[14].xyz * v0.zzz + r1.xyz;
  r1.xyz = cb2[15].xyz * v0.www + r1.xyz;
  o2.xyz = -cb1[4].xyz + r1.xyz;
  r1.xyzw = cb1[0].xxxx * cb0[13].xyzw + r1.xzxz;
  o3.xyzw = cb0[12].xyzw * r1.xyzw;
  o2.w = 0;
  r1.x = cb1[5].x * r0.y;
  r1.w = 0.5 * r1.x;
  r1.xz = float2(0.5,0.5) * r0.xw;
  o4.xy = r1.xw + r1.zz;
  r0.xy = r0.xy * float2(1,-1) + r0.ww;
  o5.xy = float2(0.5,0.5) * r0.xy;
  o4.zw = r0.zw;
  o5.zw = r0.zw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.62 on Fri Jul 21 17:22:44 2017
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// TANGENT                  0   xyzw        1     NONE   float       
// NORMAL                   0   xyz         2     NONE   float       
// TEXCOORD                 0   xyzw        3     NONE   float       
// TEXCOORD                 1   xyzw        4     NONE   float       
// TEXCOORD                 2   xyzw        5     NONE   float       
// TEXCOORD                 3   xyzw        6     NONE   float       
// COLOR                    0   xyzw        7     NONE   float       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   xyzw        5     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[14], immediateIndexed
dcl_constantbuffer cb1[6], immediateIndexed
dcl_constantbuffer cb2[16], immediateIndexed
dcl_input v0.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_temps 2
mul r0.xyzw, v0.yyyy, cb2[1].xyzw
mad r0.xyzw, cb2[0].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb2[2].xyzw, v0.zzzz, r0.xyzw
mad r0.xyzw, cb2[3].xyzw, v0.wwww, r0.xyzw
mov o0.xyzw, r0.xyzw
mov o1.xyzw, l(0,1.000000,0,1.000000)
mul r1.xyz, v0.yyyy, cb2[13].xyzx
mad r1.xyz, cb2[12].xyzx, v0.xxxx, r1.xyzx
mad r1.xyz, cb2[14].xyzx, v0.zzzz, r1.xyzx
mad r1.xyz, cb2[15].xyzx, v0.wwww, r1.xyzx
add o2.xyz, r1.xyzx, -cb1[4].xyzx
mad r1.xyzw, cb1[0].xxxx, cb0[13].xyzw, r1.xzxz
mul o3.xyzw, r1.xyzw, cb0[12].xyzw
mov o2.w, l(0)
mul r1.x, r0.y, cb1[5].x
mul r1.w, r1.x, l(0.500000)
mul r1.xz, r0.xxwx, l(0.500000, 0.000000, 0.500000, 0.000000)
add o4.xy, r1.zzzz, r1.xwxx
mad r0.xy, r0.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000), r0.wwww
mul o5.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
mov o4.zw, r0.zzzw
mov o5.zw, r0.zzzw
ret 
// Approximately 0 instruction slots used

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