//Pucci wave effect VS.
// ---- Created with 3Dmigoto v1.3.16 on Sun Sep 04 17:40:28 2022

cbuffer perMaterialBuffer : register(b0)
{
  float4 g_commonParam : packoffset(c0);
  float4 g_ambientColor : packoffset(c1);
  row_major float4x4 g_matWorldViewProj : packoffset(c2);
  float4 g_uvOffset0 : packoffset(c6);
  float4 g_uvOffset1 : packoffset(c7);
  float4 g_uvScaleNormal : packoffset(c8);
  float4 g_uvScaleAlpha : packoffset(c9);
  float4 g_ScreenToUV : packoffset(c10);
}



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


void main(
  float3 v0 : POSITION0,
  float4 v1 : COLOR0,
  float4 v2 : TEXCOORD0,
  float2 v3 : TEXCOORD1,
  out float4 o0 : SV_Position0,
  out float4 o1 : TEXCOORD0,
  out float4 o2 : TEXCOORD1,
  out float4 o3 : TEXCOORD2,
  out float4 o4 : TEXCOORD3,
  out float4 o5 : TEXCOORD4,
  out float2 o6 : COLOR0,
  out float p6 : TEXCOORD5)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(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 = g_matWorldViewProj._m30_m31_m32_m33 + r0.xyzw;
  o0.xyzw = r0.xyzw;
  o0.x+=stereo.x*stereo.y;
  p6.x = r0.z / r0.w;
  o1.xy = v2.xy;
  o1.zw = v3.xy;
  r0.xy = g_uvOffset1.zw * g_commonParam.yy;
  o2.xy = v1.xx * r0.xy;
  o2.zw = g_ScreenToUV.xy;
  o3.xy = float2(1,-1) * g_uvOffset0.xy;
  o3.zw = g_uvScaleNormal.xy;
  o4.xy = float2(1,-1) * g_uvOffset1.xy;
  o4.zw = g_uvScaleNormal.zw;
  o5.xy = float2(1,-1) * g_uvOffset0.zw;
  o5.zw = g_uvScaleAlpha.xy;
  o6.xy = v1.xw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Sun Sep 04 17:40:28 2022
//
//
// Buffer Definitions:
//
// cbuffer perMaterialBuffer
// {
//
//   float4 g_commonParam;              // Offset:    0 Size:    16
//   float4 g_ambientColor;             // Offset:   16 Size:    16 [unused]
//   row_major float4x4 g_matWorldViewProj;// Offset:   32 Size:    64
//   float4 g_uvOffset0;                // Offset:   96 Size:    16
//   float4 g_uvOffset1;                // Offset:  112 Size:    16
//   float4 g_uvScaleNormal;            // Offset:  128 Size:    16
//   float4 g_uvScaleAlpha;             // Offset:  144 Size:    16
//   float4 g_ScreenToUV;               // Offset:  160 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   xyz         0     NONE   float   xyz
// COLOR                    0   xyzw        1     NONE   float   x  w
// TEXCOORD                 0   xy          2     NONE   float   xy
// TEXCOORD                 1   xy          3     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   xyzw        5     NONE   float   xyzw
// COLOR                    0   xy          6     NONE   float   xy
// TEXCOORD                 5     z         6     NONE   float     z
//
vs_4_0
dcl_constantbuffer cb0[11], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xw
dcl_input v2.xy
dcl_input v3.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xy
dcl_output o6.z
dcl_temps 1
mul r0.xyzw, v0.yyyy, cb0[3].xyzw
mad r0.xyzw, v0.xxxx, cb0[2].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[4].xyzw, r0.xyzw
add r0.xyzw, r0.xyzw, cb0[5].xyzw
mov o0.xyzw, r0.xyzw
div o6.z, r0.z, r0.w
mov o1.xy, v2.xyxx
mov o1.zw, v3.xxxy
mul r0.xy, cb0[0].yyyy, cb0[7].zwzz
mul o2.xy, r0.xyxx, v1.xxxx
mov o2.zw, cb0[10].xxxy
mul o3.xy, cb0[6].xyxx, l(1.000000, -1.000000, 0.000000, 0.000000)
mov o3.zw, cb0[8].xxxy
mul o4.xy, cb0[7].xyxx, l(1.000000, -1.000000, 0.000000, 0.000000)
mov o4.zw, cb0[8].zzzw
mul o5.xy, cb0[6].zwzz, l(1.000000, -1.000000, 0.000000, 0.000000)
mov o5.zw, cb0[9].xxxy
mov o6.xy, v1.xwxx
ret
// Approximately 19 instruction slots used

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