//hud borders & graphics-- OLD
cbuffer cbCamera : register(b0)
{
  float4x4 ksView : packoffset(c0);
  float4x4 ksProjection : packoffset(c4);
  float4x4 ksMVPInverse : packoffset(c8);
  float4 ksCameraPosition : packoffset(c12);
  float ksNearPlane : packoffset(c13);
  float ksFarPlane : packoffset(c13.y);
  float ksFOV : packoffset(c13.z);
  float ksDofFactor : packoffset(c13.w);
}

cbuffer cbPerObject : register(b1)
{
  float4x4 ksWorld : packoffset(c0);
}

Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main( 
  float4 v0 : POSITION0,
  float3 v1 : NORMAL0,
  float2 v2 : TEXCOORD0,
  float3 v3 : TANGENT0,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : COLOR0,
  out float2 o2 : TEXCOORD0,
  out float3 o3 : TANGENT0)
{
  float4 r0,r1,r10,r11;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = dot(v0.xyzw, ksWorld._m00_m10_m20_m30);
  r0.y = dot(v0.xyzw, ksWorld._m01_m11_m21_m31);
  r0.z = dot(v0.xyzw, ksWorld._m02_m12_m22_m32);
  r0.w = dot(v0.xyzw, ksWorld._m03_m13_m23_m33);
  r1.x = dot(r0.xyzw, ksView._m00_m10_m20_m30);
  r1.y = dot(r0.xyzw, ksView._m01_m11_m21_m31);
  r1.z = dot(r0.xyzw, ksView._m02_m12_m22_m32);
  r1.w = dot(r0.xyzw, ksView._m03_m13_m23_m33);
 r10.x = dot(r1.xyzw, ksProjection._m00_m10_m20_m30);
  o0.y = dot(r1.xyzw, ksProjection._m01_m11_m21_m31);
  o0.z = dot(r1.xyzw, ksProjection._m02_m12_m22_m32);
  o0.w = dot(r1.xyzw, ksProjection._m03_m13_m23_m33);
r11.x = r10.x;
o0.x = r10.x;


float4 stereo = StereoParams.Load(0);
float4 iniParams = IniParams.Load(0);
o0.x += stereo.x * iniParams.x;

if(o0.y > -0.43)
{
r10.x += stereo.x * iniParams.y;
o0.x = r10.x;
}

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

  o1.xyz = v1.xyz;
  o1.w = v3.x;
  o2.xy = v2.xy;
  o3.xyz = float3(0,0,0);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.9 on Sat Dec 05 13:41:19 2015
//
//
// Buffer Definitions: 
//
// cbuffer cbCamera
// {
//
//   float4x4 ksView;                   // Offset:    0 Size:    64
//   float4x4 ksProjection;             // Offset:   64 Size:    64
//   float4x4 ksMVPInverse;             // Offset:  128 Size:    64 [unused]
//   float4 ksCameraPosition;           // Offset:  192 Size:    16 [unused]
//   float ksNearPlane;                 // Offset:  208 Size:     4 [unused]
//   float ksFarPlane;                  // Offset:  212 Size:     4 [unused]
//   float ksFOV;                       // Offset:  216 Size:     4 [unused]
//   float ksDofFactor;                 // Offset:  220 Size:     4 [unused]
//
// }
//
// cbuffer cbPerObject
// {
//
//   float4x4 ksWorld;                  // Offset:    0 Size:    64
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cbCamera                          cbuffer      NA          NA    0        1
// cbPerObject                       cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float   xyz 
// TEXCOORD                 0   xy          2     NONE   float   xy  
// TANGENT                  0   xyz         3     NONE   float   x   
//
//
// 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  
// TANGENT                  0   xyz         3     NONE   float   xyz 
//
vs_4_0
dcl_constantbuffer cb0[8], immediateIndexed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xy
dcl_input v3.x
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
dcl_output o3.xyz
dcl_temps 2
dp4 r0.x, v0.xyzw, cb1[0].xyzw
dp4 r0.y, v0.xyzw, cb1[1].xyzw
dp4 r0.z, v0.xyzw, cb1[2].xyzw
dp4 r0.w, v0.xyzw, cb1[3].xyzw
dp4 r1.x, r0.xyzw, cb0[0].xyzw
dp4 r1.y, r0.xyzw, cb0[1].xyzw
dp4 r1.z, r0.xyzw, cb0[2].xyzw
dp4 r1.w, r0.xyzw, cb0[3].xyzw
dp4 o0.x, r1.xyzw, cb0[4].xyzw
dp4 o0.y, r1.xyzw, cb0[5].xyzw
dp4 o0.z, r1.xyzw, cb0[6].xyzw
dp4 o0.w, r1.xyzw, cb0[7].xyzw
mov o1.xyz, v1.xyzx
mov o1.w, v3.x
mov o2.xy, v2.xyxx
mov o3.xyz, l(0,0,0,0)
ret 
// Approximately 17 instruction slots used

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