//Radial blur VS.
// ---- Created with 3Dmigoto v1.3.16 on Fri Sep 02 21:00:56 2022

cbuffer perMaterialBuffer : register(b0)
{
  row_major float4x4 transform : packoffset(c0);
  float2 textureSize : packoffset(c4);
  float4 color : packoffset(c5);
  float4 size : packoffset(c6);
  float4 center : packoffset(c7);
  float4 param : packoffset(c8);
}



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


void main(
  float2 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : TEXCOORD0)
{
  float4 r0,r10;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  
  r0.xyzw = transform._m10_m11_m12_m13 * v0.yyyy;
  r0.xyzw = v0.xxxx * transform._m00_m01_m02_m03 + r0.xyzw;
  r0.xyzw = transform._m30_m31_m32_m33 + r0.xyzw;
  o0.xy = r0.xy * r0.ww;
  o0.zw = r0.zw;
  r0.xy = size.xy * v1.xy;
  r0.xy = r0.xy / textureSize.xy;
  r0.zw = size.zw / textureSize.xy;
  r0.xy = r0.zw + r0.xy;
  
  r10.xyzw = center.xyzw;
  r10.x+=stereo.x*0.5;
  
  r0.zw = r10.xy * center.zw + r0.zw;
  
  o1.xy = r0.xy + -r0.zw;
  o1.zw = r0.zw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Fri Sep 02 21:00:56 2022
//
//
// Buffer Definitions:
//
// cbuffer perMaterialBuffer
// {
//
//   row_major float4x4 transform;      // Offset:    0 Size:    64
//   float2 textureSize;                // Offset:   64 Size:     8
//   float4 color;                      // Offset:   80 Size:    16 [unused]
//   float4 size;                       // Offset:   96 Size:    16
//   float4 center;                     // Offset:  112 Size:    16
//   float4 param;                      // Offset:  128 Size:    16 [unused]
//
// }
//
//
// 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   xy          0     NONE   float   xy
// 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   xyzw        1     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[8], immediateIndexed
dcl_input v0.xy
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_temps 1
mul r0.xyzw, v0.yyyy, cb0[1].xyzw
mad r0.xyzw, v0.xxxx, cb0[0].xyzw, r0.xyzw
add r0.xyzw, r0.xyzw, cb0[3].xyzw
mul o0.xy, r0.wwww, r0.xyxx
mov o0.zw, r0.zzzw
mul r0.xy, v1.xyxx, cb0[6].xyxx
div r0.xy, r0.xyxx, cb0[4].xyxx
div r0.zw, cb0[6].zzzw, cb0[4].xxxy
add r0.xy, r0.xyxx, r0.zwzz
mad r0.zw, cb0[7].xxxy, cb0[7].zzzw, r0.zzzw
add o1.xy, -r0.zwzz, r0.xyxx
mov o1.zw, r0.zzzw
ret
// Approximately 13 instruction slots used

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