//map blue background
// ---- Created with 3Dmigoto v1.3.16 on Sun Aug 16 01:20:04 2020

cbuffer SkyboxDynamics : register(b0)
{
  row_major float4x4 g_ViewProjInverse : packoffset(c0);
  float g_ArrayIndex : packoffset(c4);
  float g_MipLOD : packoffset(c4.y);
  float g_HorizontalStretch : packoffset(c4.z);
  float4 g_aCoords[16] : packoffset(c5);
}



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


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

  r0.x = 0.5 / g_HorizontalStretch;
  r0.y = -0.5;
  r0.z = v0.x;
  o0.xy = g_aCoords[r0.z].xy * r0.xy + float2(0.5,0.5);
  o1.xyzw = g_aCoords[r0.z].xyzw;

float4 stereo = StereoParams.Load(0);
float4 iniParams = IniParams.Load(0);
o1.x += stereo.x * 0.8;

  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Sun Aug 16 01:20:04 2020
//
//
// Buffer Definitions:
//
// cbuffer SkyboxDynamics
// {
//
//   row_major float4x4 g_ViewProjInverse;// Offset:    0 Size:    64 [unused]
//   float g_ArrayIndex;                // Offset:   64 Size:     4 [unused]
//   float g_MipLOD;                    // Offset:   68 Size:     4 [unused]
//   float g_HorizontalStretch;         // Offset:   72 Size:     4
//   float4 g_aCoords[16];              // Offset:   80 Size:   256
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SkyboxDynamics                    cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_VERTEXID              0   x           0   VERTID    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy
// SV_POSITION              0   xyzw        1      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[21], dynamicIndexed
dcl_input_sgv v0.x, vertex_id
dcl_output o0.xy
dcl_output_siv o1.xyzw, position
dcl_temps 1
div r0.x, l(0.500000), cb0[4].z
mov r0.y, l(-0.500000)
mov r0.z, v0.x
mad o0.xy, cb0[r0.z + 5].xyxx, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
mov o1.xyzw, cb0[r0.z + 5].xyzw
ret
// Approximately 6 instruction slots used

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