// Main VS Shadows

cbuffer g_CameraVS_CB : register(b0)
{

  struct
  {
    row_major float4x4 vs_viewProj;
    row_major float4x4 vs_view;
    float4 vs_worldCamPos;
    float4 vs_projection_params;
    float4 vs_inverse_projection_xy;
    float4 vs_frustum_params;
    float4 vs_inverse_projection2;
    float4 vs_cameraOrigin;
  } g_CameraVS : packoffset(c0);

}

cbuffer g_MiscGroup2VS_Infrequent_CB : register(b1)
{

  struct
  {
    float4 vs_wind_params;
    float4 vs_screenSize;
    float4 vs_viewportScaleBias;
    float4 vs_halfPixelOffset;
    float4 vs_screenDoorScaleBias;
  } g_MiscGroup2VS_Infrequent : packoffset(c0);

}



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


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

  o0.xy = v0.xy;
  o0.zw = float2(0.999000013,1);
  r0.xy = float2(-0.5,-0.5) + v1.xy;
  r0.xy = g_CameraVS.vs_inverse_projection_xy.xy * r0.xy;
  o1.zw = r0.xy * float2(2,-2) + g_CameraVS.vs_inverse_projection_xy.zw;
  o1.xy = v1.xy * g_MiscGroup2VS_Infrequent.vs_viewportScaleBias.zw + g_MiscGroup2VS_Infrequent.vs_viewportScaleBias.xy;
  o2.xy = g_CameraVS.vs_projection_params.xw;
  o2.z = 1;
  o2.w = g_CameraVS.vs_inverse_projection2.x;
  o3.xyzw = g_MiscGroup2VS_Infrequent.vs_screenSize.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// Buffer Definitions: 
//
// cbuffer g_CameraVS_CB
// {
//
//   struct CameraVS
//   {
//       
//       row_major float4x4 vs_viewProj;// Offset:    0
//       row_major float4x4 vs_view;    // Offset:   64
//       float4 vs_worldCamPos;         // Offset:  128
//       float4 vs_projection_params;   // Offset:  144
//       float4 vs_inverse_projection_xy;// Offset:  160
//       float4 vs_frustum_params;      // Offset:  176
//       float4 vs_inverse_projection2; // Offset:  192
//       float4 vs_cameraOrigin;        // Offset:  208
//
//   } g_CameraVS;                      // Offset:    0 Size:   224
//
// }
//
// cbuffer g_MiscGroup2VS_Infrequent_CB
// {
//
//   struct MiscGroup2VS_Infrequent
//   {
//       
//       float4 vs_wind_params;         // Offset:    0
//       float4 vs_screenSize;          // Offset:   16
//       float4 vs_viewportScaleBias;   // Offset:   32
//       float4 vs_halfPixelOffset;     // Offset:   48
//       float4 vs_screenDoorScaleBias; // Offset:   64
//
//   } g_MiscGroup2VS_Infrequent;       // Offset:    0 Size:    80
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// g_CameraVS_CB                     cbuffer      NA          NA    0        1
// g_MiscGroup2VS_Infrequent_CB      cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xy  
// TEXCOORD                 0   xy          1     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[13], immediateIndexed
dcl_constantbuffer cb1[3], immediateIndexed
dcl_input v0.xy
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_temps 1
mov o0.xy, v0.xyxx
mov o0.zw, l(0,0,0.999000,1.000000)
add r0.xy, v1.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
mul r0.xy, r0.xyxx, cb0[10].xyxx
mad o1.zw, r0.xxxy, l(0.000000, 0.000000, 2.000000, -2.000000), cb0[10].zzzw
mad o1.xy, v1.xyxx, cb1[2].zwzz, cb1[2].xyxx
mov o2.xy, cb0[9].xwxx
mov o2.z, l(1.000000)
mov o2.w, cb0[12].x
mov o3.xyzw, cb1[1].xyzw
ret 
// Approximately 11 instruction slots used

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