//cinematics
// ---- Created with 3Dmigoto v1.3.11 on Tue Aug 07 17:30:58 2018

cbuffer cb_g_Bink : register(b5)
{

  struct
  {
    float4x3 YUVToRGB;
    float4 m_BinkSettings;
  } g_Bink : packoffset(c0);

}



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


void main(
  uint v0 : SV_VertexID0,
  uint v1 : SV_InstanceID0,
  out float4 o0 : SV_Position0,
  out float2 o1 : TEXCOORD0)
{
// Needs manual fix for instruction:
// unknown dcl_: dcl_input_sgv v0.x, vertex_id
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = (int)v0.x & 1;
  r0.z = (uint)v0.x >> 1;
  r0.xy = (int2)r0.xz;
  r0.xy = r0.xy * float2(2,2) + float2(-1,-1);
  o0.xy = r0.xy;
  r0.xy = r0.xy * float2(0.5,-0.5) + float2(0.5,0.5);
  o0.zw = float2(0,1);
  r0.w = 1 + -r0.y;
  r1.x = cmp(0 != g_Bink.m_BinkSettings.y);
  r0.z = r1.x ? r0.w : r0.y;
  o1.xy = r0.xz;

float4 iniParams = IniParams.Load(0);
float4 stereo = StereoParams.Load(0);
float corrhere = IniParams.Load(int2(2,0)).z;
o0.x += stereo.x * 0.1*corrhere;

  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.3.11 on Tue Aug 07 17:30:58 2018
//
//
// Buffer Definitions:
//
// cbuffer cb_g_Bink
// {
//
//   struct BinkConsts
//   {
//
//       float4x3 YUVToRGB;             // Offset:    0
//       float4 m_BinkSettings;         // Offset:   48
//
//   } g_Bink;                          // Offset:    0 Size:    64
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cb_g_Bink                         cbuffer      NA          NA    5        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_VertexID              0   x           0   VERTID    uint   x
// SV_InstanceID            0   x           1   INSTID    uint
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb5[4], immediateIndexed
dcl_input_sgv v0.x, vertex_id
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_temps 2
and r0.x, v0.x, l(1)
ushr r0.z, v0.x, l(1)
itof r0.xy, r0.xzxx
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mov o0.xy, r0.xyxx
mad r0.xy, r0.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mov o0.zw, l(0,0,0,1.000000)
add r0.w, -r0.y, l(1.000000)
ne r1.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb5[3].y
movc r0.z, r1.x, r0.w, r0.y
mov o1.xy, r0.xzxx
ret
// Approximately 12 instruction slots used

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