//hud 2
// ---- Created with 3Dmigoto v1.3.11 on Sun Nov 11 12:27:03 2018

cbuffer _Globals : register(b0)
{
  row_major float4x4 mvp : packoffset(c0);
}



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


void main(
  int2 v0 : POSITION0,
  out float4 o0 : SV_Position0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  o0.zw = float2(0,1);
  r0.xy = (int2)v0.xy;
  r0.z = 1;
  o0.x = dot(r0.xyz, mvp._m00_m01_m03);
  o0.y = dot(r0.xyz, mvp._m10_m11_m13);

//fix ui depth
float4 stereo = StereoParams.Load(0);
float4 params = IniParams.Load(0);
float4 scaledepth = IniParams.Load(int2(2,0)).z;
    
if(o0.x > -0.6 && o0.x < 0.5 && o0.y > -0.6 && o0.y < 0.75)
    {
      o0.x += stereo.x * scaledepth * params.z;
    }
else
{
  o0.x += stereo.x * params.z;
}

  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.3.11 on Sun Nov 11 12:27:03 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   row_major float4x4 mvp;            // Offset:    0 Size:    64
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xy          0     NONE     int   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[2], immediateIndexed
dcl_input v0.xy
dcl_output_siv o0.xyzw, position
dcl_temps 1
mov o0.zw, l(0,0,0,1.000000)
itof r0.xy, v0.xyxx
mov r0.z, l(1.000000)
dp3 o0.x, r0.xyzx, cb0[0].xywx
dp3 o0.y, r0.xyzx, cb0[1].xywx
ret
// Approximately 6 instruction slots used

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