// puddlereflection

cbuffer PER_BATCH : register(b0)
{
  float4 g_ScreenSize : packoffset(c0);
}

cbuffer PER_FRAME : register(b2)
{
  float4 g_VS_HPosScale : packoffset(c21);
}


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


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

  o0.z = v0.z;
  o0.w = 1;
  r0.xy = v0.xy * float2(1,-1) + float2(0,1);
  r0.xy = r0.xy * float2(2,2) + float2(-1,-1);
  o0.xy = r0.xy;
  r0.xy = r0.xy * float2(1,-1) + float2(1,1);
  r0.xy = g_VS_HPosScale.xy * r0.xy;
  r0.xy = float2(0.5,0.5) * r0.xy;
  r0.zw = g_ScreenSize.xy * r0.xy;
  o1.xy = r0.xy;
  o1.zw = float2(0.25,0.25) * r0.zw;
  o2.xyz = v2.xyz;
  o2.w = 0;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.960.8229
//
//
// Buffer Definitions: 
//
// cbuffer PER_BATCH
// {
//
//   float4 g_ScreenSize;               // Offset:    0 Size:    16
//
// }
//
// cbuffer PER_FRAME
// {
//
//   float4 g_VS_HPosScale;             // Offset:  336 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// PER_BATCH                         cbuffer      NA          NA    0        1
// PER_FRAME                         cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz 
// TEXCOORD                 0   xy          1     NONE   float       
// TEXCOORD                 1   xyz         2     NONE   float   xyz 
//
//
// 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
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[1], immediateIndexed
dcl_constantbuffer cb2[22], immediateIndexed
dcl_input v0.xyz
dcl_input v2.xyz
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_temps 1
mov o0.z, v0.z
mov o0.w, l(1.000000)
mad r0.xy, v0.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000), l(0.000000, 1.000000, 0.000000, 0.000000)
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mov o0.xy, r0.xyxx
mad r0.xy, r0.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
mul r0.xy, r0.xyxx, cb2[21].xyxx
mul r0.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
mul r0.zw, r0.xxxy, cb0[0].xxxy
mov o1.xy, r0.xyxx
mul o1.zw, r0.zzzw, l(0.000000, 0.000000, 0.250000, 0.250000)
mov o2.xyz, v2.xyzx
mov o2.w, l(0)
ret 
// Approximately 14 instruction slots used

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