//Map VS 4 (crosshair).
// ---- Created with 3Dmigoto v1.3.16 on Wed May 26 23:58:55 2021
cbuffer cb1 : register(b1)
{
  float4 cb1[15];
}

cbuffer cb0 : register(b0)
{
  float4 cb0[57];
}




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


void main(
  float4 v0 : ATTRIBUTE0,
  float3 v1 : ATTRIBUTE1,
  float4 v2 : ATTRIBUTE2,
  float4 v3 : ATTRIBUTE3,
  float4 v4 : ATTRIBUTE4,
  out float4 o0 : TEXCOORD10,
  out float4 o1 : TEXCOORD11,
  out float4 o2 : TEXCOORD0,
  out float4 o3 : TEXCOORD1,
  out float4 o4 : SV_POSITION0)
{
  float4 r0,r1,r2,r3,r4;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  
  o0.w = 0;
  r0.xyz = v1.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r1.xyzw = v2.xyzw * float4(2,2,2,2) + float4(-1,-1,-1,-1);
  r2.xyz = r1.yzx * r0.xyz;
  r0.xyz = r1.xyz * r0.yzx + -r2.xyz;
  r0.xyz = r0.xyz * r1.www;
  r2.xyz = r0.xyz * r1.yzx;
  r0.xyz = r0.zxy * r1.zxy + -r2.xyz;
  r0.xyz = r0.xyz * r1.www;
  r2.xyz = cb1[12].yyy * cb1[1].xyz;
  r3.xyz = r2.xyz * r0.yyy;
  r2.xyz = r2.xyz * r1.yyy;
  r4.xyz = cb1[12].xxx * cb1[0].xyz;
  r0.xyw = r0.xxx * r4.xyz + r3.xyz;
  r2.xyz = r1.xxx * r4.xyz + r2.xyz;
  r3.xyz = cb1[12].zzz * cb1[2].xyz;
  o0.xyz = r0.zzz * r3.xyz + r0.xyw;
  o1.xyz = r1.zzz * r3.xyz + r2.xyz;
  o1.w = cb1[9].w * r1.w;
  o2.xyzw = v4.xyzw;
  r0.x = asint(cb1[14].w) & 4;
  r0.x = cmp((int)r0.x == 4);
  r0.yzw = cb1[14].xyz + -cb1[13].xyz;
  r0.yzw = v0.xyz * r0.yzw + cb1[13].xyz;
  r0.xyz = r0.xxx ? r0.yzw : v0.xyz;
  r1.xyz = cb1[1].xyz * r0.yyy;
  r0.xyw = cb1[0].xyz * r0.xxx + r1.xyz;
  r0.xyz = cb1[2].xyz * r0.zzz + r0.xyw;
  r1.xyz = cb1[3].xyz + cb0[56].xyz;
  r0.xyz = r1.xyz + r0.xyz;
  r1.xyzw = cb0[1].xyzw * r0.yyyy;
  r1.xyzw = r0.xxxx * cb0[0].xyzw + r1.xyzw;
  r0.xyzw = r0.zzzz * cb0[2].xyzw + r1.xyzw;
  r0.xyzw = cb0[3].xyzw + r0.xyzw;
  
  o3.xyzw = r0.xyzw;
  r0.x+=stereo.x*(r0.w-stereo.y*1.5);
  o4.xyzw = r0.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Wed May 26 23:58:55 2021
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// ATTRIBUTE                0   xyzw        0     NONE   float   xyz
// ATTRIBUTE                1   xyz         1     NONE   float   xyz
// ATTRIBUTE                2   xyzw        2     NONE   float   xyzw
// ATTRIBUTE                3   xyzw        3     NONE   float
// ATTRIBUTE                4   xyzw        4     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float   xyzw
// TEXCOORD                11   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 1   xyzw        3     NONE   float   xyzw
// SV_POSITION              0   xyzw        4      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[57], immediateIndexed
dcl_constantbuffer cb1[15], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xyz
dcl_input v2.xyzw
dcl_input v4.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output_siv o4.xyzw, position
dcl_temps 5
mov o0.w, l(0)
mad r0.xyz, v1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r1.xyzw, v2.xyzw, l(2.000000, 2.000000, 2.000000, 2.000000), l(-1.000000, -1.000000, -1.000000, -1.000000)
mul r2.xyz, r0.xyzx, r1.yzxy
mad r0.xyz, r1.xyzx, r0.yzxy, -r2.xyzx
mul r0.xyz, r1.wwww, r0.xyzx
mul r2.xyz, r1.yzxy, r0.xyzx
mad r0.xyz, r0.zxyz, r1.zxyz, -r2.xyzx
mul r0.xyz, r1.wwww, r0.xyzx
mul r2.xyz, cb1[1].xyzx, cb1[12].yyyy
mul r3.xyz, r0.yyyy, r2.xyzx
mul r2.xyz, r1.yyyy, r2.xyzx
mul r4.xyz, cb1[0].xyzx, cb1[12].xxxx
mad r0.xyw, r0.xxxx, r4.xyxz, r3.xyxz
mad r2.xyz, r1.xxxx, r4.xyzx, r2.xyzx
mul r3.xyz, cb1[2].xyzx, cb1[12].zzzz
mad o0.xyz, r0.zzzz, r3.xyzx, r0.xywx
mad o1.xyz, r1.zzzz, r3.xyzx, r2.xyzx
mul o1.w, r1.w, cb1[9].w
mov o2.xyzw, v4.xyzw
and r0.x, cb1[14].w, l(4)
ieq r0.x, r0.x, l(4)
add r0.yzw, -cb1[13].xxyz, cb1[14].xxyz
mad r0.yzw, v0.xxyz, r0.yyzw, cb1[13].xxyz
movc r0.xyz, r0.xxxx, r0.yzwy, v0.xyzx
mul r1.xyz, r0.yyyy, cb1[1].xyzx
mad r0.xyw, cb1[0].xyxz, r0.xxxx, r1.xyxz
mad r0.xyz, cb1[2].xyzx, r0.zzzz, r0.xywx
add r1.xyz, cb0[56].xyzx, cb1[3].xyzx
add r0.xyz, r0.xyzx, r1.xyzx
mul r1.xyzw, r0.yyyy, cb0[1].xyzw
mad r1.xyzw, r0.xxxx, cb0[0].xyzw, r1.xyzw
mad r0.xyzw, r0.zzzz, cb0[2].xyzw, r1.xyzw
add r0.xyzw, r0.xyzw, cb0[3].xyzw
mov o3.xyzw, r0.xyzw
mov o4.xyzw, r0.xyzw
ret
// Approximately 0 instruction slots used

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