// ---- Created with 3Dmigoto v1.3.16 on Sat Aug 29 00:06:53 2020

cbuffer flashConstantsVS : register(b0)
{
  row_major float4x4 gv_matrixV : packoffset(c0);
  row_major float4x4 gv_matrixP : packoffset(c4);
}

cbuffer flashVariablesVS : register(b1)
{
  row_major float4x4 gv_matrixW : packoffset(c0);
  row_major float4x4 gv_matrixT : packoffset(c4);
}



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


void main(
  float3 v0 : POSITION0,
  float2 v1 : TEXCOORDS0,
  out float2 o0 : TEXCOORD0,
  out float4 o1 : SV_Position0)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;

  o0.xy = v1.xy;
  r0.xyzw = gv_matrixW._m10_m11_m12_m13 * v0.yyyy;
  r0.xyzw = v0.xxxx * gv_matrixW._m00_m01_m02_m03 + r0.xyzw;
  r0.xyzw = v0.zzzz * gv_matrixW._m20_m21_m22_m23 + r0.xyzw;
  r0.xyzw = gv_matrixW._m30_m31_m32_m33 + r0.xyzw;
  r1.xyzw = gv_matrixP._m10_m11_m12_m13 * r0.yyyy;
  r1.xyzw = r0.xxxx * gv_matrixP._m00_m01_m02_m03 + r1.xyzw;
  r1.xyzw = r0.zzzz * gv_matrixP._m20_m21_m22_m23 + r1.xyzw;
  r0.xyzw = r0.wwww * gv_matrixP._m30_m31_m32_m33 + r1.xyzw;
  r1.xyzw = gv_matrixV._m10_m11_m12_m13 * r0.yyyy;
  r1.xyzw = r0.xxxx * gv_matrixV._m00_m01_m02_m03 + r1.xyzw;
  r1.xyzw = r0.zzzz * gv_matrixV._m20_m21_m22_m23 + r1.xyzw;
  o1.xyzw = r0.wwww * gv_matrixV._m30_m31_m32_m33 + r1.xyzw;


float4 stereo = StereoParams.Load(0);
float4 iniParams = IniParams.Load(0);
o1.x += stereo.x * iniParams.x;
if(iniParams.z == 1){o1 = 0;}

  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022
//
//   using 3Dmigoto v1.3.16 on Sat Aug 29 00:06:53 2020
//
//
// Buffer Definitions:
//
// cbuffer flashConstantsVS
// {
//
//   row_major float4x4 gv_matrixV;     // Offset:    0 Size:    64
//   row_major float4x4 gv_matrixP;     // Offset:   64 Size:    64
//
// }
//
// cbuffer flashVariablesVS
// {
//
//   row_major float4x4 gv_matrixW;     // Offset:    0 Size:    64
//   row_major float4x4 gv_matrixT;     // Offset:   64 Size:    64 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// flashConstantsVS                  cbuffer      NA          NA    0        1
// flashVariablesVS                  cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz
// TEXCOORDS                0   xy          1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy
// SV_Position              0   xyzw        1      POS   float   xyzw
//
vs_4_1
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[8], immediateIndexed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_output o0.xy
dcl_output_siv o1.xyzw, position
dcl_temps 2
mov o0.xy, v1.xyxx
mul r0.xyzw, v0.yyyy, cb1[1].xyzw
mad r0.xyzw, v0.xxxx, cb1[0].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb1[2].xyzw, r0.xyzw
add r0.xyzw, r0.xyzw, cb1[3].xyzw
mul r1.xyzw, r0.yyyy, cb0[5].xyzw
mad r1.xyzw, r0.xxxx, cb0[4].xyzw, r1.xyzw
mad r1.xyzw, r0.zzzz, cb0[6].xyzw, r1.xyzw
mad r0.xyzw, r0.wwww, cb0[7].xyzw, r1.xyzw
mul r1.xyzw, r0.yyyy, cb0[1].xyzw
mad r1.xyzw, r0.xxxx, cb0[0].xyzw, r1.xyzw
mad r1.xyzw, r0.zzzz, cb0[2].xyzw, r1.xyzw
mad o1.xyzw, r0.wwww, cb0[3].xyzw, r1.xyzw
ret
// Approximately 14 instruction slots used

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