//HUD - Text
// ---- Created with 3Dmigoto v1.2.21 on Sun Jan 03 02:14:32 2016

cbuffer para : register(b0)
{
  float4 world0 : packoffset(c0);
  float4 world1 : packoffset(c1);
  float4 x_off : packoffset(c2);
  float4 texgen_s : packoffset(c3);
  float4 texgen_t : packoffset(c4);
  float4 x3d : packoffset(c5);
  float4 y3d : packoffset(c6);
  float4 w3d : packoffset(c7);
}



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


void main( 
  float4 v0 : POSITION0,
  float4 v1 : TEXCOORD0,
  out float4 o0 : SV_Position0,
  out float4 o1 : TEXCOORD0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = dot(v0.xyzw, world1.xyzw);
  r0.xyz = y3d.xyz * r0.xxx;
  r0.w = dot(v0.xyzw, world0.xyzw);
  r0.xyz = r0.www * x3d.xyz + r0.xyz;
  r0.xyz = w3d.xyz + r0.xyz;
  r0.z = 1 / r0.z;
  o0.xy = r0.xy * r0.zz;
  o0.z = world0.z;
  o0.w = 1;
  o1.xy = v1.xy * r0.zz;
  o1.w = r0.z;
  o1.z = 1;
  
float4 stereo = StereoParams.Load(0);
float4 ini = IniParams.Load(0);

float4 button_text = IniParams.Load(int2(2,0));
if (!button_text.y) 
{
	o0.x += stereo.x * ini.x;
}
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.21 on Sun Jan 03 02:14:32 2016
//
//
// Buffer Definitions: 
//
// cbuffer para
// {
//
//   float4 world0;                     // Offset:    0 Size:    16
//   float4 world1;                     // Offset:   16 Size:    16
//   float4 x_off;                      // Offset:   32 Size:    16 [unused]
//   float4 texgen_s;                   // Offset:   48 Size:    16 [unused]
//   float4 texgen_t;                   // Offset:   64 Size:    16 [unused]
//   float4 x3d;                        // Offset:   80 Size:    16
//   float4 y3d;                        // Offset:   96 Size:    16
//   float4 w3d;                        // Offset:  112 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// para                              cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xyzw        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
//
vs_4_0
dcl_constantbuffer cb0[8], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_temps 1
dp4 r0.x, v0.xyzw, cb0[1].xyzw
mul r0.xyz, r0.xxxx, cb0[6].xyzx
dp4 r0.w, v0.xyzw, cb0[0].xyzw
mad r0.xyz, r0.wwww, cb0[5].xyzx, r0.xyzx
add r0.xyz, r0.xyzx, cb0[7].xyzx
div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
mul o0.xy, r0.zzzz, r0.xyxx
mov o0.z, cb0[0].z
mov o0.w, l(1.000000)
mul o1.xy, r0.zzzz, v1.xyxx
mov o1.w, r0.z
mov o1.z, l(1.000000)
ret 
// Approximately 13 instruction slots used

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