// HUD 4

cbuffer CBufferGlobalConstant_Z : register(b0)
{

  struct
  {
    float4 c[90];
  } Global : packoffset(c0);

}

cbuffer CBufferUserConstant_Z : register(b1)
{

  struct
  {
    float4 c[58];
  } User : 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 float4 o1 : TEXCOORD0,
  out float o2 : INSTANCE_COLOR0,
  out uint2 o3 : INSTANCE_INDEXES0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = -Global.c[16].zw + v0.xy;
  r0.xy = r0.xy / Global.c[16].xy;
  r0.xy = r0.xy * User.c[0].xy + User.c[0].zw;
  r0.z = v0.z * Global.c[52].z + Global.c[52].w;
  o0.xy = r0.xy * r0.zz;
  o0.w = r0.z;
  o0.z = v0.z * Global.c[51].z + Global.c[51].w;
       
  float4 stereo = StereoParams.Load(0);
  float4 iniParams = IniParams.Load(0);


  //       o0.x -= stereo.x * (o0.w - stereo.y);


        
  


  
  r0.xy = -User.c[1].zw + v1.xy;
  o1.zw = User.c[1].xy * r0.xy;
  o1.xy = v1.xy;
  o2.x = 0;
  o3.xy = float2(0,0);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v1.3.16 on Tue May 14 19:18:53 2019
//
//
// Buffer Definitions:
//
// cbuffer CBufferGlobalConstant_Z
// {
//
//   struct StructGlobalConstant_Z
//   {
//
//       float4 c[90];                  // Offset:    0
//
//   } Global;                          // Offset:    0 Size:  1440
//
// }
//
// cbuffer CBufferUserConstant_Z
// {
//
//   struct StructUserConstant_Z
//   {
//
//       float4 c[58];                  // Offset:    0
//
//   } User;                            // Offset:    0 Size:   928
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// CBufferGlobalConstant_Z           cbuffer      NA          NA    0        1
// CBufferUserConstant_Z             cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz
// 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   xyzw        1     NONE   float   xyzw
// INSTANCE_COLOR           0   x           2     NONE   float   x
// INSTANCE_INDEXES         0   xy          3     NONE    uint   xy
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[53], immediateIndexed
dcl_constantbuffer cb1[2], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.x
dcl_output o3.xy
dcl_temps 1
add r0.xy, v0.xyxx, -cb0[16].zwzz
div r0.xy, r0.xyxx, cb0[16].xyxx
mad r0.xy, r0.xyxx, cb1[0].xyxx, cb1[0].zwzz
mad r0.z, v0.z, cb0[52].z, cb0[52].w
mul o0.xy, r0.zzzz, r0.xyxx
mov o0.w, r0.z
mad o0.z, v0.z, cb0[51].z, cb0[51].w
add r0.xy, v1.xyxx, -cb1[1].zwzz
mul o1.zw, r0.xxxy, cb1[1].xxxy
mov o1.xy, v1.xyxx
mov o2.x, l(0)
mov o3.xy, l(0,0,0,0)
ret
// Approximately 13 instruction slots used

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