//P5S antialiasing.
// ---- Created with 3Dmigoto v1.3.16 on Mon Mar 07 00:31:59 2022

cbuffer _Globals : register(b0)
{
  float4 texIdx : packoffset(c0);
  row_major float4x4 mL2P : packoffset(c1);
}



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


void main(
  float4 v0 : POSITION0,
  float4 v1 : TEXCOORD0,
  float4 v2 : TEXCOORD1,
  float4 v3 : TEXCOORD2,
  float2 v4 : TEXCOORD3,
  out float4 o0 : SV_Position0,
  out float4 o1 : TEXCOORD0,
  out float4 o2 : TEXCOORD1)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  float4 iniparams13 = IniParams.Load(int2(13,0));
  
  r0.xyzw = mL2P._m10_m11_m12_m13 * v0.yyyy;
  r0.xyzw = v0.xxxx * mL2P._m00_m01_m02_m03 + r0.xyzw;
  r0.xyzw = v0.zzzz * mL2P._m20_m21_m22_m23 + r0.xyzw;
  o0.xyzw = v0.wwww * mL2P._m30_m31_m32_m33 + r0.xyzw;
  r0.xyzw = cmp(float4(0,0,0,0) < texIdx.xyzw);
  o1.xyzw = r0.xxyy ? v2.xyyx : v1.xyyx;
  r0.xyzw = r0.zzww ? v2.xyyx : v1.xyyx;
  r1.xyzw = cmp(float4(1,1,2,2) < texIdx.zwzw);
  r0.xyzw = r1.xxyy ? v3.xyyx : r0.xyzw;
  o2.xyzw = r1.zzww ? v4.xyyx : r0.xyzw;
  if (iniparams13.x==1) {
  o0.x-=stereo.x*(o0.w-stereo.y);
  }
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Mon Mar 07 00:31:59 2022
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 texIdx;                     // Offset:    0 Size:    16
//   row_major float4x4 mL2P;           // Offset:   16 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
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
// TEXCOORD                 1   xy          2     NONE   float   xy
// TEXCOORD                 2   xy          3     NONE   float   xy
// TEXCOORD                 3   xy          4     NONE   float   xy
//
//
// 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[5], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_input v2.xy
dcl_input v3.xy
dcl_input v4.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_temps 2
mul r0.xyzw, v0.yyyy, cb0[2].xyzw
mad r0.xyzw, v0.xxxx, cb0[1].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[3].xyzw, r0.xyzw
mad o0.xyzw, v0.wwww, cb0[4].xyzw, r0.xyzw
lt r0.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[0].xyzw
movc o1.xyzw, r0.xxyy, v2.xyyx, v1.xyyx
movc r0.xyzw, r0.zzww, v2.xyyx, v1.xyyx
lt r1.xyzw, l(1.000000, 1.000000, 2.000000, 2.000000), cb0[0].zwzw
movc r0.xyzw, r1.xxyy, v3.xyyx, r0.xyzw
movc o2.xyzw, r1.zzww, v4.xyyx, r0.xyzw
ret
// Approximately 11 instruction slots used

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