//hud loading back
// ---- Created with 3Dmigoto v1.3.11 on Sun Nov 11 12:35:05 2018

cbuffer _Globals : register(b0)
{
  float4 Adjust : packoffset(c0);
}



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


void main(
  float4 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  out float4 o0 : SV_Position0,
  out float2 o1 : TEXCOORD0)
{
  o0.xy = v0.xy * Adjust.zw + Adjust.xy;
  o0.zw = v0.zw;
  o1.xy = v1.xy;

//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.6 && 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:35:05 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 Adjust;                     // Offset:    0 Size:    16
//
// }
//
//
// 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   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
//
vs_4_0
dcl_constantbuffer cb0[1], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
mad o0.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx
mov o0.zw, v0.zzzw
mov o1.xy, v1.xyxx
ret
// Approximately 4 instruction slots used

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