//HUD (onomatopeias).
// ---- Created with 3Dmigoto v1.3.16 on Fri Sep 02 18:45:40 2022

cbuffer perMaterialBuffer : register(b0)
{
  float4 g_commonParam : packoffset(c0);
  float4 g_fogColor : packoffset(c1);
  float4 g_fogParam : packoffset(c2);
  float4 g_ambientColor : packoffset(c3);
  row_major float4x4 g_matWorldViewProj : packoffset(c4);
  float4 g_uvOffset0 : packoffset(c8);
  float4 g_uvOffset1 : packoffset(c9);
  float4 g_blendRate : packoffset(c10);
  float4 g_blendType : packoffset(c11);
  float4 g_multColor : packoffset(c12);
}



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


void main(
  float4 v0 : POSITION0,
  float4 v1 : COLOR0,
  float2 v2 : TEXCOORD0,
  out float4 o0 : SV_Position0,
  out float4 o1 : COLOR0,
  out float2 o2 : TEXCOORD0,
  out float p2 : TEXCOORD1)
{
  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));
  float4 iniparams11 = IniParams.Load(int2(11,0));
  
  r0.xyzw = g_matWorldViewProj._m10_m11_m12_m13 * v0.yyyy;
  r0.xyzw = v0.xxxx * g_matWorldViewProj._m00_m01_m02_m03 + r0.xyzw;
  r0.xyzw = v0.zzzz * g_matWorldViewProj._m20_m21_m22_m23 + r0.xyzw;
  r0.xyzw = v0.wwww * g_matWorldViewProj._m30_m31_m32_m33 + r0.xyzw;
  o0.xyzw = r0.xyzw;
  if (o0.w==1 && iniparams3.w==1) {
    o0.x+=stereo.x*(o0.w-stereo.y*(1-v0.z)*0.0025);
  } else if (o0.w==1) {
    o0.x+=stereo.x*iniparams10.x;
	o0.xyzw=o0.xyzw*iniparams11.y;
  } else if (iniparams3.w==4) {
    o0.x+=stereo.x*stereo.y;
  }
  r0.x = g_fogParam.y + -r0.w;
  r0.yzw = g_multColor.xyz * v1.xyz;
  o1.xyz = g_ambientColor.xyz * r0.yzw;
  o1.w = v1.w;
  r0.y = g_fogParam.y + -g_fogParam.x;
  r0.x = saturate(r0.x / r0.y);
  r0.x = r0.x * g_fogParam.z + -g_fogParam.z;
  p2.x = 1 + r0.x;
  o2.xy = v2.xy * g_uvOffset0.zw + g_uvOffset0.xy;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Fri Sep 02 18:45:40 2022
//
//
// Buffer Definitions:
//
// cbuffer perMaterialBuffer
// {
//
//   float4 g_commonParam;              // Offset:    0 Size:    16 [unused]
//   float4 g_fogColor;                 // Offset:   16 Size:    16 [unused]
//   float4 g_fogParam;                 // Offset:   32 Size:    16
//   float4 g_ambientColor;             // Offset:   48 Size:    16
//   row_major float4x4 g_matWorldViewProj;// Offset:   64 Size:    64
//   float4 g_uvOffset0;                // Offset:  128 Size:    16
//   float4 g_uvOffset1;                // Offset:  144 Size:    16 [unused]
//   float4 g_blendRate;                // Offset:  160 Size:    16 [unused]
//   float4 g_blendType;                // Offset:  176 Size:    16 [unused]
//   float4 g_multColor;                // Offset:  192 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// perMaterialBuffer                 cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     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
// TEXCOORD                 1     z         2     NONE   float     z
//
vs_4_0
dcl_constantbuffer cb0[13], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyzw
dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
dcl_output o2.z
dcl_temps 1
mul r0.xyzw, v0.yyyy, cb0[5].xyzw
mad r0.xyzw, v0.xxxx, cb0[4].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[6].xyzw, r0.xyzw
mad r0.xyzw, v0.wwww, cb0[7].xyzw, r0.xyzw
mov o0.xyzw, r0.xyzw
add r0.x, -r0.w, cb0[2].y
mul r0.yzw, v1.xxyz, cb0[12].xxyz
mul o1.xyz, r0.yzwy, cb0[3].xyzx
mov o1.w, v1.w
add r0.y, -cb0[2].x, cb0[2].y
div_sat r0.x, r0.x, r0.y
mad r0.x, r0.x, cb0[2].z, -cb0[2].z
add o2.z, r0.x, l(1.000000)
mad o2.xy, v2.xyxx, cb0[8].zwzz, cb0[8].xyxx
ret
// Approximately 15 instruction slots used

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