// ---- Created with 3Dmigoto v1.2.69 on Tue May 01 13:17:35 2018

cbuffer PER_BATCH : register(b0)
{
  float4 g_vViewPos : packoffset(c0);
  row_major float4x4 RotMatrix : packoffset(c1);
}

cbuffer PER_FRAME : register(b2)
{
  float4 g_VS_ScreenSize : packoffset(c7);
}



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


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

  o0.xyzw = v0.xyzw * float4(2,-2,1,1) + float4(-1,1,0,0);
  r0.xyz = g_vViewPos.xyz + v2.xyz;
  r0.yw = RotMatrix._m10_m11 * r0.yy;
  r0.xy = r0.xx * RotMatrix._m00_m01 + r0.yw;
  r0.xy = r0.zz * RotMatrix._m20_m21 + r0.xy;
  r0.zw = RotMatrix._m10_m11 * g_vViewPos.yy;
  r0.zw = g_vViewPos.xx * RotMatrix._m00_m01 + r0.zw;
  r0.zw = g_vViewPos.zz * RotMatrix._m20_m21 + r0.zw;
  o1.zw = r0.xy + -r0.zw;
  o1.xy = r0.zw;
  r0.xy = g_VS_ScreenSize.xy * v1.xy;
  o2.zw = float2(0.25,0.25) * r0.xy;
  o2.xy = v1.xy;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.960.8229
//
//
// Buffer Definitions: 
//
// cbuffer PER_BATCH
// {
//
//   float4 g_vViewPos;                 // Offset:    0 Size:    16
//   row_major float4x4 RotMatrix;      // Offset:   16 Size:    64
//
// }
//
// cbuffer PER_FRAME
// {
//
//   float4 g_VS_ScreenSize;            // Offset:  112 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// PER_BATCH                         cbuffer      NA          NA    0        1
// PER_FRAME                         cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy  
// TEXCOORD                 1   xyz         2     NONE   float   xyz 
//
//
// 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
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[4], immediateIndexed
dcl_constantbuffer cb2[8], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_input v2.xyz
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_temps 1
mad o0.xyzw, v0.xyzw, l(2.000000, -2.000000, 1.000000, 1.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
add r0.xyz, v2.xyzx, cb0[0].xyzx
mul r0.yw, r0.yyyy, cb0[2].xxxy
mad r0.xy, r0.xxxx, cb0[1].xyxx, r0.ywyy
mad r0.xy, r0.zzzz, cb0[3].xyxx, r0.xyxx
mul r0.zw, cb0[0].yyyy, cb0[2].xxxy
mad r0.zw, cb0[0].xxxx, cb0[1].xxxy, r0.zzzw
mad r0.zw, cb0[0].zzzz, cb0[3].xxxy, r0.zzzw
add o1.zw, -r0.zzzw, r0.xxxy
mov o1.xy, r0.zwzz
mul r0.xy, v1.xyxx, cb2[7].xyxx
mul o2.zw, r0.xxxy, l(0.000000, 0.000000, 0.250000, 0.250000)
mov o2.xy, v1.xyxx
ret 
// Approximately 14 instruction slots used

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