//HUD Depth
cbuffer PER_STAGE : register(b0)
{
  row_major float4x4 viewproj_matrix : packoffset(c0);
}

Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
  float4 v0 : Position0,
  float4 v1 : Color0,
  float2 v2 : Texcoord0,
  out float4 o0 : SV_Position0,
  out float4 o1 : Color0,
  out float4 o2 : Texcoord0)
{
  float4 r0;
  uint4 bitmask;
  o0.zw = float2(9.999900e-001,1.000000e+000);
  r0.xy = v0.xy;
  r0.zw = float2(1.000000e+000,1.000000e+000);
  o0.x = dot(viewproj_matrix._m00_m01_m02_m03, r0.xyww);
  o0.y = dot(viewproj_matrix._m10_m11_m12_m13, r0.xyzw);
  
float4 stereo = StereoParams.Load(0);
float4 iniParams = IniParams.Load(0);
o0.x += stereo.x*iniParams.z;

  o1.xyzw = v1.zyxw;
  o2.xy = v2.xy;
  o2.zw = v0.zw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20499
//
//
// Buffer Definitions: 
//
// cbuffer PER_STAGE
// {
//
//   row_major float4x4 viewproj_matrix;// Offset:    0 Size:    64
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// PER_STAGE                         cbuffer      NA          NA    0        1
//
//
//
// 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   xy          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
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[2], 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_temps 1
mov o0.zw, l(0,0,0.999990,1.000000)
mov r0.xy, v0.xyxx
mov r0.zw, l(0,0,1.000000,1.000000)
dp4 o0.x, cb0[0].xyzw, r0.xyww
dp4 o0.y, cb0[1].xyzw, r0.xyzw
mov o1.xyzw, v1.zyxw
mov o2.xy, v2.xyxx
mov o2.zw, v0.zzzw
ret 
// Approximately 9 instruction slots used
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
