// HUD - Key/Button icons
cbuffer cb0 : register(b0)
{
  float4 cb0[2];
}




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


void main(
  float2 v0 : ATTRIBUTE4,
  float4 v1 : ATTRIBUTE0,
  out float2 o0 : ATTRIBUTE4,
  out float4 o1 : SV_Position0)
{
  o0.xy = v0.xy;
  o1.x = dot(v1.xyzw, cb0[0].xyzw);
  o1.y = dot(v1.xyzw, cb0[1].xyzw);
  o1.zw = float2(0,1);
   
float4 stereo = StereoParams.Load(0);
float4 params = IniParams.Load(0);
float crosshair = IniParams.Load(uint2(4,0)).z;
float gameplay = IniParams.Load(uint2(5,0)).z;

if(gameplay && crosshair == 1 && o1.x > -0.4 && o1.x < 0.4 && o1.y > -0.4 && o1.y < 0.4)
	o1.x += adjust_from_depth_buffer(0,0);
else
	o1.x += stereo.x * params.z;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sun Sep 15 22:19:16 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// ATTRIBUTE                4   xy          0     NONE   float   xy
// ATTRIBUTE                0   xyzw        1     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// ATTRIBUTE                4   xy          0     NONE   float   xy
// SV_Position              0   xyzw        1      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[2], immediateIndexed
dcl_input v0.xy
dcl_input v1.xyzw
dcl_output o0.xy
dcl_output_siv o1.xyzw, position
mov o0.xy, v0.xyxx
dp4 o1.x, v1.xyzw, cb0[0].xyzw
dp4 o1.y, v1.xyzw, cb0[1].xyzw
mov o1.zw, l(0,0,0,1.000000)
ret
// Approximately 0 instruction slots used

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