//HUD 2.
// ---- Created with 3Dmigoto v1.2.64 on Fri Sep 08 20:37:05 2017

cbuffer _Globals : register(b0)
{
  float4 _sp_system_virtual_screen_param : packoffset(c0);
  float _sp_position_z : packoffset(c1);
  float2 _sp_size : packoffset(c1.y);
}



// 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;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  float4 iniparams = IniParams.Load(0);
  float4 iniparams1 = IniParams.Load(int2(1,0));
  
  r0.xy = v0.xy / _sp_system_virtual_screen_param.xy;
  r0.xy = r0.xy * float2(2,2) + float2(-1,-1);
  //o0.xy = float2(1,-1) * r0.xy;
  o0.x = float(1) * r0.x * iniparams1.y;
  o0.y = float(-1) * r0.y;
  o0.z = _sp_position_z;
  o0.w = v0.w;
  o0.x+=stereo.x*iniparams.x;
  o1.xyzw = v1.xyzw;
  o2.xy = v2.xy / _sp_size.xy;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
//   using 3Dmigoto v1.2.64 on Fri Sep 08 20:37:05 2017
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   float4 _sp_system_virtual_screen_param;// Offset:    0 Size:    16
//   float _sp_position_z;              // Offset:   16 Size:     4
//   float2 _sp_size;                   // Offset:   20 Size:     8
//
// }
//
//
// 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   xy w
// 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_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[2], immediateIndexed
dcl_input v0.xyw
dcl_input v1.xyzw
dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
dcl_temps 1
div r0.xy, v0.xyxx, cb0[0].xyxx
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul o0.xy, r0.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000)
mov o0.z, cb0[1].x
mov o0.w, v0.w
mov o1.xyzw, v1.xyzw
div o2.xy, v2.xyxx, cb0[1].yzyy
ret 
// Approximately 8 instruction slots used

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