//Turok plus lens flares from new gun VS.
// ---- Created with 3Dmigoto v1.3.11 on Mon Aug 13 22:01:52 2018

cbuffer _Globals : register(b0)
{
  float4 uClipPlane0 : packoffset(c0);
  float4 uClipPlane1 : packoffset(c1);
  float4 uClipPlane2 : packoffset(c2);
  float4 uClipPlane3 : packoffset(c3);
  int uReflective : packoffset(c4);
  float3 uLightDirection : packoffset(c4.y);
  float4 uLightDirectionColor : packoffset(c5);
  float4x4 uTransform : packoffset(c6);
}



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


void main(
  float3 v0 : ATTRIB0,
  float2 v1 : ATTRIB1,
  float4 v2 : ATTRIB2,
  out float4 o0 : SV_POSITION0,
  out float2 o1 : TEXCOORD0,
  out float4 o2 : COLOR0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);
  
  r0.xyzw = uTransform._m01_m11_m21_m31 * v0.yyyy;
  r0.xyzw = uTransform._m00_m10_m20_m30 * v0.xxxx + r0.xyzw;
  r0.xyzw = uTransform._m02_m12_m22_m32 * v0.zzzz + r0.xyzw;
  o0.xyzw = uTransform._m03_m13_m23_m33 + r0.xyzw;
  o1.xy = v1.xy;
  o2.xyzw = v2.xyzw;
  o0.x+=stereo.x*(1-stereo.y*0.00125);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.18773
//
//   using 3Dmigoto v1.3.11 on Mon Aug 13 22:01:52 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 uClipPlane0;                // Offset:    0 Size:    16 [unused]
//   float4 uClipPlane1;                // Offset:   16 Size:    16 [unused]
//   float4 uClipPlane2;                // Offset:   32 Size:    16 [unused]
//   float4 uClipPlane3;                // Offset:   48 Size:    16 [unused]
//   int uReflective;                   // Offset:   64 Size:     4 [unused]
//   float3 uLightDirection;            // Offset:   68 Size:    12 [unused]
//   float4 uLightDirectionColor;       // Offset:   80 Size:    16 [unused]
//   float4x4 uTransform;               // Offset:   96 Size:    64
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// ATTRIB                   0   xyz         0     NONE   float   xyz
// ATTRIB                   1   xy          1     NONE   float   xy
// ATTRIB                   2   xyzw        2     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
// COLOR                    0   xyzw        2     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[10], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_input v2.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o2.xyzw
dcl_temps 1
mul r0.xyzw, v0.yyyy, cb0[7].xyzw
mad r0.xyzw, cb0[6].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb0[8].xyzw, v0.zzzz, r0.xyzw
add o0.xyzw, r0.xyzw, cb0[9].xyzw
mov o1.xy, v1.xyxx
mov o2.xyzw, v2.xyzw
ret
// Approximately 7 instruction slots used

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