// hlsltool.py --install-to c:\py\1 --auto-fix-vertex-halo --only-autofixed --no-validate --ignore-other-errors a541482fb309450c-vs_replace.txt
// ---- Created with 3Dmigoto v1.2.62 on Sun Jul 16 13:11:54 2017
cbuffer cb1 : register(b1)
{
  float4 cb1[8];
}

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




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


void main( 
  float4 v0 : POSITION0,
  float4 v1 : COLOR0,
  float4 v2 : TEXCOORD0,
  out float4 o0 : SV_Position0,
  out float4 o1 : COLOR0,
  out float4 o2 : TEXCOORD0,
  out float2 o3 : TEXCOORD2)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

float4 stereo = StereoParams.Load(0);
float separation = stereo.x, convergence = stereo.y, eye = stereo.z;

  r0.xyzw = cb1[1].xyzw * v0.yyyy;
  r0.xyzw = cb1[0].xyzw * v0.xxxx + r0.xyzw;
  r0.xyzw = cb1[2].xyzw * v0.zzzz + r0.xyzw;
  r0.xyzw = cb1[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 a541482fb309450c-vs_replace.txt
if (r0.w != 1.0) { r0.x += separation * (r0.w - convergence); }

  o2.xyzw = r0.xyzw;
  r0.x = cb1[5].z * v0.y;
  r0.x = cb1[4].z * v0.x + r0.x;
  r0.x = cb1[6].z * v0.z + r0.x;
  r0.x = cb1[7].z * v0.w + r0.x;
  r0.x = -0.00999999978 * r0.x;
  o1.xyzw = v1.xyzw / r0.xxxx;
  o3.xy = v2.xy * cb0[3].xy + cb0[3].zw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyzw        2     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xy          3     NONE   float   xy  
//
vs_4_0
dcl_constantbuffer cb0[4], immediateIndexed
dcl_constantbuffer cb1[8], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyzw
dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xy
dcl_temps 1
mul r0.xyzw, v0.yyyy, cb1[1].xyzw
mad r0.xyzw, cb1[0].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb1[2].xyzw, v0.zzzz, r0.xyzw
mad r0.xyzw, cb1[3].xyzw, v0.wwww, r0.xyzw
mov o0.xyzw, r0.xyzw
mov o2.xyzw, r0.xyzw
mul r0.x, v0.y, cb1[5].z
mad r0.x, cb1[4].z, v0.x, r0.x
mad r0.x, cb1[6].z, v0.z, r0.x
mad r0.x, cb1[7].z, v0.w, r0.x
mul r0.x, r0.x, l(-0.010000)
div o1.xyzw, v1.xyzw, r0.xxxx
mad o3.xy, v2.xyxx, cb0[3].xyxx, cb0[3].zwzz
ret 
// Approximately 0 instruction slots used

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