//hud buttons etc
// ---- Created with 3Dmigoto v1.3.11 on Sun Aug 19 20:21:53 2018

cbuffer g_vertex_databuffer : register(b0)
{

  struct
  {
    float4 mvp0;
    float4 mvp1;
    float4 texgen0;
    float4 texgen1;
  } g_vertex_data : packoffset(c0);

}



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


void main(
  int4 v0 : POSITION0,
  float4 v1 : COLOR0,
  float4 v2 : COLOR1,
  out float4 o0 : SV_Position0,
  out float2 o1 : TEXCOORD0,
  out float2 p1 : TEXCOORD1,
  out float4 o2 : COLOR0,
  out float4 o3 : COLOR1)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  o0.w = 1;
  r0.xyzw = (int4)v0.xyzw;
  o0.x = dot(r0.xyzw, g_vertex_data.mvp0.xyzw);
  o0.y = dot(r0.xyzw, g_vertex_data.mvp1.xyzw);
  o0.z = r0.z;
  o1.x = dot(r0.xyzw, g_vertex_data.texgen0.xyzw);
  o1.y = dot(r0.xyzw, g_vertex_data.texgen1.xyzw);
  p1.xy = float2(0,0);
  o2.xyzw = v1.xyzw;
  o3.xyzw = v2.xyzw;



float4 stereo = StereoParams.Load(0);
  float4 iniParams = IniParams.Load(0);
  
  float4 tex_filter = IniParams.Load(int2(2,0));
  if (tex_filter.x == 2)
    {
    o0.x += stereo.x * iniParams.z*13;
  
    }
 

  if (tex_filter.x == 3)
    {
    o0.x += stereo.x * iniParams.z*1.2;
    }


  if (tex_filter.x == 4)
    {
    o0.x += stereo.x * iniParams.z*4;
    }

  if (tex_filter.x == 5)
    {
    o0.x += stereo.x * iniParams.z*0;
    }

  if (tex_filter.x == 6)
    {
    o0.x -= stereo.x * iniParams.z*0.02;
    }

  if (tex_filter.x == 7)
    {
    o0.x += stereo.x * iniParams.z*0.1;
    }

  if (tex_filter.x == 8)
    {
    o0.x += stereo.x * iniParams.z*0.501;
    }


else
    {
    o0.x += stereo.x * iniParams.z*0.5;
    }




  
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.3.11 on Sun Aug 19 20:21:53 2018
//
//
// Buffer Definitions:
//
// cbuffer g_vertex_databuffer
// {
//
//   struct
//   {
//
//       float4 mvp0;                   // Offset:    0
//       float4 mvp1;                   // Offset:   16
//       float4 texgen0;                // Offset:   32
//       float4 texgen1;                // Offset:   48
//
//   } g_vertex_data;                   // Offset:    0 Size:    64
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// g_vertex_databuffer               cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE     int   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// COLOR                    1   xyzw        2     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
// TEXCOORD                 1     zw        1     NONE   float     zw
// COLOR                    0   xyzw        2     NONE   float   xyzw
// COLOR                    1   xyzw        3     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[4], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyzw
dcl_input v2.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o1.zw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_temps 1
mov o0.w, l(1.000000)
itof r0.xyzw, v0.xyzw
dp4 o0.x, r0.xyzw, cb0[0].xyzw
dp4 o0.y, r0.xyzw, cb0[1].xyzw
mov o0.z, r0.z
dp4 o1.x, r0.xyzw, cb0[2].xyzw
dp4 o1.y, r0.xyzw, cb0[3].xyzw
mov o1.zw, l(0,0,0,0)
mov o2.xyzw, v1.xyzw
mov o3.xyzw, v2.xyzw
ret
// Approximately 11 instruction slots used

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