//Skybox VS 4.
// ---- Created with 3Dmigoto v0.6.181 on Mon Jan  1 17:09:45 2024

cbuffer Buffer1 : register(b1)
{
  float _generated_dummy_variable_1 : packoffset(c0);
  float4 cFogParams : packoffset(c6);
  float4 cClipPlane0 : packoffset(c24);
}

cbuffer Buffer5 : register(b5)
{
  row_major float4x4 cObjectToView : packoffset(c0);
}



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


void main(
  float4 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  out float4 o0 : SV_POSITION0,
  out float2 o1 : TEXCOORD0,
  out float p1 : TEXCOORD1,
  out float o2 : SV_ClipDistance0)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  
  r0.x = dot(cObjectToView._m00_m01_m02_m03, v0.xyzw);
  r0.y = dot(cObjectToView._m10_m11_m12_m13, v0.xyzw);
  r0.z = dot(cObjectToView._m20_m21_m22_m23, v0.xyzw);
  r0.w = dot(cObjectToView._m30_m31_m32_m33, v0.xyzw);
  o0.xyzw = r0.xyzw;
  
  o0.x+=stereo.x*stereo.y*0.996875;
  
  r1.x = dot(r0.xyzw, r0.xyzw);
  o2.x = dot(cClipPlane0.xyzw, r0.xyzw);
  r0.x = sqrt(r1.x);
  r0.x = r0.x * cFogParams.x + cFogParams.y;
  r0.x = max(cFogParams.w, r0.x);
  p1.x = min(1, r0.x);
  o1.xy = v1.xy;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.181 on Mon Jan  1 17:09:45 2024
//
//
// Buffer Definitions:
//
// cbuffer Buffer1
// {
//
//   float _generated_dummy_variable_1; // Offset:    0 Size:     4 [unused]
//   float4 cFogParams;                 // Offset:   96 Size:    16
//   float4 cClipPlane0;                // Offset:  384 Size:    16
//
// }
//
// cbuffer Buffer5
// {
//
//   row_major float4x4 cObjectToView;  // Offset:    0 Size:    64
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Buffer1                           cbuffer      NA          NA    1        1
// Buffer5                           cbuffer      NA          NA    5        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
// TEXCOORD                 1     z         1     NONE   float     z
// SV_ClipDistance          0   x           2  CLIPDST   float   x
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB1[25], immediateIndexed
dcl_constantbuffer CB5[4], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o1.z
dcl_output_siv o2.x, clip_distance
dcl_temps 2
dp4 r0.x, cb5[0].xyzw, v0.xyzw
dp4 r0.y, cb5[1].xyzw, v0.xyzw
dp4 r0.z, cb5[2].xyzw, v0.xyzw
dp4 r0.w, cb5[3].xyzw, v0.xyzw
mov o0.xyzw, r0.xyzw
dp4 r1.x, r0.xyzw, r0.xyzw
dp4 o2.x, cb1[24].xyzw, r0.xyzw
sqrt r0.x, r1.x
mad r0.x, r0.x, cb1[6].x, cb1[6].y
max r0.x, r0.x, cb1[6].w
min o1.z, r0.x, l(1.000000)
mov o1.xy, v1.xyxx
ret
// Approximately 13 instruction slots used

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