// Halo

cbuffer cVSSystem : register(b0)
{

  struct
  {
    float4 m_param;
    float4 m_renderInfo;
    float4 m_renderBuffer;
    float4 m_dominantLightDir;
  } g_vsSystem : packoffset(c0);

}



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


void main( 
  float4 v0 : POSITION0,
  out float4 o0 : TEXCOORD0,
  out float4 o1 : TEXCOORD1,
  out float4 o2 : SV_Position0)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  o2.xyzw = v0.xyzw;
  o0.xyzw = v0.xyzw;
  
  float4 stereo = StereoParams.Load(0);
  v0.x += stereo.x * (v0.w - stereo.y);
  
  
  
  
  r0.xyz = float3(0.5,-0.5,0.5) * v0.xyw;
  r0.xy = r0.xy + r0.zz;
  r1.xyzw = g_vsSystem.m_renderBuffer.zwzw * g_vsSystem.m_renderInfo.xyzw;
  
  r0.zw = v0.ww * r1.zw;
  o1.xy = r0.xy * r1.xy + r0.zw;
  o1.zw = v0.zw;
  
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.24 on Mon Jan 18 12:24:41 2016
//
//
// Buffer Definitions: 
//
// cbuffer cVSSystem
// {
//
//   struct VSSystem
//   {
//       
//       float4 m_param;                // Offset:    0
//       float4 m_renderInfo;           // Offset:   16
//       float4 m_renderBuffer;         // Offset:   32
//       float4 m_dominantLightDir;     // Offset:   48
//
//   } g_vsSystem;                      // Offset:    0 Size:    64
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cVSSystem                         cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 1   xyzw        1     NONE   float   xyzw
// SV_Position              0   xyzw        2      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_input v0.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output_siv o2.xyzw, position
dcl_temps 2
mov o0.xyzw, v0.xyzw
mul r0.xyz, v0.xywx, l(0.500000, -0.500000, 0.500000, 0.000000)
add r0.xy, r0.zzzz, r0.xyxx
mul r1.xyzw, cb0[1].xyzw, cb0[2].zwzw
mul r0.zw, r1.zzzw, v0.wwww
mad o1.xy, r0.xyxx, r1.xyxx, r0.zwzz
mov o1.zw, v0.zzzw
mov o2.xyzw, v0.xyzw
ret 
// Approximately 9 instruction slots used

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