//Slow time part 2 VS.
// ---- Created with 3Dmigoto v1.3.14 on Sun Mar 10 12:32:38 2019

cbuffer SceneInfo : register(b0)
{
  row_major float4x4 viewProjMat : packoffset(c0);
  row_major float3x4 transposeViewMat : packoffset(c4);
  row_major float3x4 transposeViewInvMat : packoffset(c7);
  float4 projElement[2] : packoffset(c10);
  float4 projInvElements[2] : packoffset(c12);
  row_major float4x4 viewProjInvMat : packoffset(c14);
  row_major float4x4 prevViewProjMat : packoffset(c18);
  float3 ZToLinear : packoffset(c22);
  float subdivisionLevel : packoffset(c22.w);
  float2 screenSize : packoffset(c23);
  float2 screenInverseSize : packoffset(c23.z);
  float2 cullingHelper : packoffset(c24);
  float cameraNearPlane : packoffset(c24.z);
  float cameraFarPlane : packoffset(c24.w);
  float4 viewFrustum[6] : packoffset(c25);
  float4 clipplane : packoffset(c31);
}



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


void main(
  float3 v0 : POSITION0,
  float3 v1 : POSITION1,
  float4 v2 : NORMAL0,
  float4 v3 : TANGENT0,
  float2 v4 : TEXCOORD0,
  float2 v5 : Texcoord1,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : INTERPOLATOR0,
  out float4 o2 : INTERPOLATOR1,
  out float4 o3 : INTERPOLATOR2,
  out float4 o4 : INTERPOLATOR3,
  out float o5 : INTERPOLATOR4)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);
  //v1.x+=stereo.x*(v1.z-stereo.y);
  
  r0.xyzw = viewProjMat._m10_m11_m12_m13 * v0.yyyy;
  r0.xyzw = v0.xxxx * viewProjMat._m00_m01_m02_m03 + r0.xyzw;
  r0.xyzw = v0.zzzz * viewProjMat._m20_m21_m22_m23 + r0.xyzw;
  o0.xyzw = viewProjMat._m30_m31_m32_m33 + r0.xyzw;
  //o0.x-=stereo.x*(o0.w-stereo.y);
  o1.xyz = v2.xyz;
  o1.w = v4.x;
  o2.x = v4.y;
  o2.yz = v5.xy;
  o2.w = v3.x;
  o3.xyz = v3.yzw;
  o3.w = v0.x;
  
  
  
  r0.xyz = prevViewProjMat._m10_m11_m13 * v1.yyy;
  r0.xyz = v1.xxx * prevViewProjMat._m00_m01_m03 + r0.xyz;
  r0.xyz = v1.zzz * prevViewProjMat._m20_m21_m23 + r0.xyz;
  r0.xyz = prevViewProjMat._m30_m31_m33 + r0.xyz;
  o4.zw = r0.xy;
  o5.x = r0.z;
  o4.xy = v0.yz;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v1.3.14 on Sun Mar 10 12:32:38 2019
//
//
// Buffer Definitions:
//
// cbuffer SceneInfo
// {
//
//   row_major float4x4 viewProjMat;    // Offset:    0 Size:    64
//   row_major float3x4 transposeViewMat;// Offset:   64 Size:    48 [unused]
//   row_major float3x4 transposeViewInvMat;// Offset:  112 Size:    48 [unused]
//   float4 projElement[2];             // Offset:  160 Size:    32 [unused]
//   float4 projInvElements[2];         // Offset:  192 Size:    32 [unused]
//   row_major float4x4 viewProjInvMat; // Offset:  224 Size:    64 [unused]
//   row_major float4x4 prevViewProjMat;// Offset:  288 Size:    64
//   float3 ZToLinear;                  // Offset:  352 Size:    12 [unused]
//   float subdivisionLevel;            // Offset:  364 Size:     4 [unused]
//   float2 screenSize;                 // Offset:  368 Size:     8 [unused]
//   float2 screenInverseSize;          // Offset:  376 Size:     8 [unused]
//   float2 cullingHelper;              // Offset:  384 Size:     8 [unused]
//   float cameraNearPlane;             // Offset:  392 Size:     4 [unused]
//   float cameraFarPlane;              // Offset:  396 Size:     4 [unused]
//   float4 viewFrustum[6];             // Offset:  400 Size:    96 [unused]
//   float4 clipplane;                  // Offset:  496 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SceneInfo                         cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz
// POSITION                 1   xyz         1     NONE   float   xyz
// NORMAL                   0   xyzw        2     NONE   float   xyz
// TANGENT                  0   xyzw        3     NONE   float   xyzw
// TEXCOORD                 0   xy          4     NONE   float   xy
// Texcoord                 1   xy          5     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// INTERPOLATOR             0   xyzw        1     NONE   float   xyzw
// INTERPOLATOR             1   xyzw        2     NONE   float   xyzw
// INTERPOLATOR             2   xyzw        3     NONE   float   xyzw
// INTERPOLATOR             3   xyzw        4     NONE   float   xyzw
// INTERPOLATOR             4   x           5     NONE   float   x
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[22], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xyz
dcl_input v2.xyz
dcl_input v3.xyzw
dcl_input v4.xy
dcl_input v5.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.x
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
add o0.xyzw, r0.xyzw, cb0[3].xyzw
mov o1.xyz, v2.xyzx
mov o1.w, v4.x
mov o2.x, v4.y
mov o2.yz, v5.xxyx
mov o2.w, v3.x
mov o3.xyz, v3.yzwy
mov o3.w, v0.x
mul r0.xyz, v1.yyyy, cb0[19].xywx
mad r0.xyz, v1.xxxx, cb0[18].xywx, r0.xyzx
mad r0.xyz, v1.zzzz, cb0[20].xywx, r0.xyzx
add r0.xyz, r0.xyzx, cb0[21].xywx
mov o4.zw, r0.xxxy
mov o5.x, r0.z
mov o4.xy, v0.yzyy
ret
// Approximately 19 instruction slots used

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