// ---- Created with 3Dmigoto v1.3.16.41 on Sat Jan 02 19:56:04 2021
//   sky nebula / stars vertex shader



cbuffer _Globals : register(b0)
{
  float4x4 g_customViewProjection : packoffset(c0);
}



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


void main(
  float4 v0 : TEXCOORD0,
  float3 v1 : TEXCOORD1,
  out float4 o0 : SV_Position0,
  out float3 o1 : TEXCOORD0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  // load stereo info first
  float4 st = StereoParams.Load(0);
  float separation = st.x; float convergence = st.y;

  r0.xyz = v0.xyz * 200; // fix 1
  r0.w = 200; //  fix 2
  

  // r0.x += separation * 1; //
  
  o0.x = dot(r0.xyzw, g_customViewProjection._m00_m10_m20_m30);
  o0.y = dot(r0.xyzw, g_customViewProjection._m01_m11_m21_m31);
  o0.z = dot(r0.xyzw, g_customViewProjection._m02_m12_m22_m32);
  o0.w = dot(r0.xyzw, g_customViewProjection._m03_m13_m23_m33);
  o1.xyz = v1.xyz;
  
//o0.xyzw = r0.xyzw; //



//o1.x += separation; //



  
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v1.3.16.41 on Sat Jan 02 19:56:04 2021
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4x4 g_customViewProjection;   // Offset:    0 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
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyz         0     NONE   float   xyz
// TEXCOORD                 1   xyz         1     NONE   float   xyz
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyz         1     NONE   float   xyz
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[4], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xyz
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_temps 1
mov r0.xyz, v0.xyzx
mov r0.w, l(1.000000)
dp4 o0.x, r0.xyzw, cb0[0].xyzw
dp4 o0.y, r0.xyzw, cb0[1].xyzw
dp4 o0.z, r0.xyzw, cb0[2].xyzw
dp4 o0.w, r0.xyzw, cb0[3].xyzw
mov o1.xyz, v1.xyzx
ret
// Approximately 8 instruction slots used

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