
cbuffer PER_BATCH : register(b0)
{
  row_major float4x4 g_mViewProj : packoffset(c0);
}

cbuffer PER_FRAME : register(b3)
{
  row_major float4x4 g_VS_ViewProjMatr : packoffset(c0);  //new
  float4 g_VS_SunLightDir : packoffset(c4); //new
  float4 g_VS_WorldViewPos : packoffset(c6); //new
  float4 g_VS_ScreenSize : packoffset(c7);
  float4 g_VS_AnimGenParams : packoffset(c8); //new
  float4 g_VS_NearFarClipDist : packoffset(c9); //new
  row_major float4x4 g_VS_ViewProjZeroMatr : packoffset(c10); //new
  float4 g_VS_HPosScale : packoffset(c21);
  
}

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

void main( 
  float4 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  float4 v2 : COLOR0,
  out float4 o0 : SV_Position0,
  
   out float4 nearfar : TEXCOORD2,
  out float4 res : TEXCOORD3)
  
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyzw = g_mViewProj._m10_m11_m12_m13 * v0.yyyy;
  r0.xyzw = v0.xxxx * g_mViewProj._m00_m01_m02_m03 + r0.xyzw;
  r0.xyzw = v0.zzzz * g_mViewProj._m20_m21_m22_m23 + r0.xyzw;
  o0.xyzw = v0.wwww * g_mViewProj._m30_m31_m32_m33 + r0.xyzw;
  
  //Pass far clipping plane and screen resolution through to pixel shader:
  nearfar = g_VS_NearFarClipDist;
  res = g_VS_ScreenSize;
  
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Buffer Definitions: 
//
// cbuffer PER_BATCH
// {
//
//   row_major float4x4 g_mViewProj;    // Offset:    0 Size:    64
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// PER_BATCH                         cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float       
// COLOR                    0   xyzw        2     NONE   float       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[4], immediateIndexed
dcl_input v0.xyzw
dcl_output_siv o0.xyzw, position
dcl_temps 1
mul r0.xyzw, v0.yyyy, cb0[1].xyzw
mad r0.xyzw, v0.xxxx, cb0[0].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[2].xyzw, r0.xyzw
mad o0.xyzw, v0.wwww, cb0[3].xyzw, r0.xyzw
ret 
// Approximately 5 instruction slots used

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