//HUD 4
// ---- Created with 3Dmigoto v0.6.164 on Tue Oct 15 23:55:06 2024
cbuffer cb3 : register(b3)
{
  float4 cb3[2];
}

cbuffer cb2 : register(b2)
{
  float4 cb2[21];
}

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

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




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


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

  r0.xy = cb3[1].xy * v0.xy;
  r1.xyzw = cb1[1].xyzw * r0.yyyy;
  r0.xyzw = cb1[0].xyzw * r0.xxxx + r1.xyzw;
  r0.xyzw = cb1[2].xyzw * v0.zzzz + r0.xyzw;
  r0.xyzw = cb1[3].xyzw + r0.xyzw;
  r1.xyzw = cb2[18].xyzw * r0.yyyy;
  r1.xyzw = cb2[17].xyzw * r0.xxxx + r1.xyzw;
  r1.xyzw = cb2[19].xyzw * r0.zzzz + r1.xyzw;
  o0.xyzw = cb2[20].xyzw * r0.wwww + r1.xyzw;
  
float4 s = StereoParams.Load(0);
float4 texFilter = IniParams.Load(int2(14,0));
float4 menu = IniParams.Load(int2(15,0));
float4 testeo = IniParams.Load(int2(90,0));
float4 crosshair  = IniParams.Load(int2(60,0));  

//-18.5 --> -0.00291999895
//-16.0 --> -0.00390000641
//cb2[12].z --> fov
float correction = -0.00390000641 + ((cb2[12].z - (-16.0)) * ((-0.00291999895 - -0.00390000641) / (-18.5 - (-16.0))));
if (!cb2[12].z){
	o0.x -= s.x * (o0.w - s.y);
} 
	
if (o0.w == 1){
	o0.x += s.x * (o0.w - s.y * cb2[12].z * correction);
	}


  
  
  r0.xyzw = cb0[2].xyzw * v1.xyzw;
  o1.xyzw = cb3[0].xyzw * r0.xyzw;
  o2.xy = v2.xy;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.164 on Tue Oct 15 23:55:06 2024
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz
// 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   xy          2     NONE   float   xy
//
vs_4_0
dcl_constantbuffer CB0[3], immediateIndexed
dcl_constantbuffer CB1[4], immediateIndexed
dcl_constantbuffer CB2[21], immediateIndexed
dcl_constantbuffer CB3[2], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xyzw
dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
dcl_temps 2
mul r0.xy, v0.xyxx, cb3[1].xyxx
mul r1.xyzw, r0.yyyy, cb1[1].xyzw
mad r0.xyzw, cb1[0].xyzw, r0.xxxx, r1.xyzw
mad r0.xyzw, cb1[2].xyzw, v0.zzzz, r0.xyzw
add r0.xyzw, r0.xyzw, cb1[3].xyzw
mul r1.xyzw, r0.yyyy, cb2[18].xyzw
mad r1.xyzw, cb2[17].xyzw, r0.xxxx, r1.xyzw
mad r1.xyzw, cb2[19].xyzw, r0.zzzz, r1.xyzw
mad o0.xyzw, cb2[20].xyzw, r0.wwww, r1.xyzw
mul r0.xyzw, v1.xyzw, cb0[2].xyzw
mul o1.xyzw, r0.xyzw, cb3[0].xyzw
mov o2.xy, v2.xyxx
ret
// Approximately 0 instruction slots used

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