//Geometry VS. Haunted Castle.
// ---- Created with 3Dmigoto v0.6.181 on Tue Aug 27 21:42:51 2024

cbuffer _Globals : register(b0)
{
  float4x4 modelViewProj : packoffset(c0);
  float4 constVtxColor : packoffset(c4);
}



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


void main(
  float3 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  out float4 o0 : SV_Position0,
  out float4 o1 : COLOR0,
  out float2 o2 : TEXCOORD0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  float4 iniparams3 = IniParams.Load(int2(3,0));
  float4 iniparams10 = IniParams.Load(int2(10,0));
  
  r0.xyz = v0.xyz;
  r0.w = 1;
  o0.x = dot(r0.xyzw, modelViewProj._m00_m10_m20_m30);
  o0.y = dot(r0.xyzw, modelViewProj._m01_m11_m21_m31);
  o0.z = dot(r0.xyzw, modelViewProj._m02_m12_m22_m32);
  o0.w = dot(r0.xyzw, modelViewProj._m03_m13_m23_m33);
  
  //if (iniparams3.w!=10) {
  //  o0.x+=stereo.x*(o0.w+stereo.y/o0.z);
  //}
  
  o1.xyzw = constVtxColor.xyzw;
  o2.xy = v1.xy;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.181 on Tue Aug 27 21:42:51 2024
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4x4 modelViewProj;            // Offset:    0 Size:    64
//   float4 constVtxColor;              // Offset:   64 Size:    16
//
// }
//
//
// 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   xyz         0     NONE   float   xyz
// TEXCOORD                 0   xy          1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy
//
vs_4_0
dcl_constantbuffer CB0[5], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
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.xyzw, cb0[4].xyzw
mov o2.xy, v1.xyxx
ret
// Approximately 9 instruction slots used

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