//labels
cbuffer _Globals : register(b0)
{
  float4 cv0 : packoffset(c0);
  float4 cv1 : packoffset(c1);
  float4 cv2 : packoffset(c2);
  float4 cv3 : packoffset(c3);
  float4 cv4 : packoffset(c4);
  float4 cv5 : packoffset(c5);
  float4 charArray[128] : packoffset(c6);
  float worldSpace : packoffset(c134) = float(0);
  float4x4 MVP : packoffset(c135);
  float4 charcolor : packoffset(c139);
  float epsilon : packoffset(c140) = float(9.99999975e-005);
}

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

void main( 
  float4 v0 : POSITION0,
  out float4 o0 : SV_POSITION0,
  out float2 o1 : TEXCOORD0)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;
  float y1 = IniParams.Load(int2(1, 0)).y;

  r0.x = (uint)v0.z;
  r0.y = v0.x * charArray[r0.x].y + charArray[r0.x].x;
  r1.x = cv0.x + r0.y;
  r1.y = -v0.y * cv0.w + cv0.y;
  r1.z = 1;
  o0.x = dot(r1.xyz, MVP._m00_m10_m30);
  o0.y = dot(r1.xyz, MVP._m01_m11_m31);
  o0.z = dot(r1.xyz, MVP._m02_m12_m32);
  o0.w = dot(r1.xyz, MVP._m03_m13_m33);
  r0.y = charArray[r0.x].y * v0.x;
  r0.y = r0.y * cv1.x + charArray[r0.x].z;
  r0.x = v0.y * cv0.z + charArray[r0.x].w;
  o1.xy = cv1.zw + r0.yx;
  
  float4 stereo = StereoParams.Load(0);
  float4 iniParams = IniParams.Load(0);
  //o0.x += stereo.x * iniParams.x;
  o0.x+= stereo.x * (iniParams.x*y1 - stereo.y); 
  
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
//   using 3Dmigoto v1.2.1 on Sat Oct 03 18:28:55 2015
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   float4 cv0;                        // Offset:    0 Size:    16
//   float4 cv1;                        // Offset:   16 Size:    16
//   float4 cv2;                        // Offset:   32 Size:    16 [unused]
//   float4 cv3;                        // Offset:   48 Size:    16 [unused]
//   float4 cv4;                        // Offset:   64 Size:    16 [unused]
//   float4 cv5;                        // Offset:   80 Size:    16 [unused]
//   float4 charArray[128];             // Offset:   96 Size:  2048
//   float worldSpace;                  // Offset: 2144 Size:     4 [unused]
//      = 0x00000000 
//   float4x4 MVP;                      // Offset: 2160 Size:    64
//   float4 charcolor;                  // Offset: 2224 Size:    16 [unused]
//   float epsilon;                     // Offset: 2240 Size:     4 [unused]
//      = 0x38d1b717 
//
// }
//
//
// 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   xyz 
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy  
//
vs_4_0
dcl_constantbuffer cb0[139], dynamicIndexed
dcl_input v0.xyz
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_temps 2
ftou r0.x, v0.z
mad r0.y, v0.x, cb0[r0.x + 6].y, cb0[r0.x + 6].x
add r1.x, r0.y, cb0[0].x
mad r1.y, -v0.y, cb0[0].w, cb0[0].y
mov r1.z, l(1.000000)
dp3 o0.x, r1.xyzx, cb0[135].xywx
dp3 o0.y, r1.xyzx, cb0[136].xywx
dp3 o0.z, r1.xyzx, cb0[137].xywx
dp3 o0.w, r1.xyzx, cb0[138].xywx
mul r0.y, v0.x, cb0[r0.x + 6].y
mad r0.y, r0.y, cb0[1].x, cb0[r0.x + 6].z
mad r0.x, v0.y, cb0[0].z, cb0[r0.x + 6].w
add o1.xy, r0.yxyy, cb0[1].zwzz
ret 
// Approximately 14 instruction slots used

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