//Motion blur object PS 1.
// ---- Created with 3Dmigoto v1.3.16 on Sun Dec 25 20:58:52 2022



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


void main(
  float4 v0 : SV_Position0,
  float2 v1 : TEXCOORD0,
  float4 v2 : COLOR0,
  float3 v3 : POSITION0,
  float4 v4 : POSITION1,
  float4 v5 : POSITION2,
  float3 v6 : NORMALS0,
  out float4 o1 : SV_Target1,
  out float o2 : SV_Target2)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  float4 prev = StereoParams.Load(int3(2,0,0));
  
  v4.x+=stereo.x*(v4.w-stereo.y);
  if (prev.x>5.0) {
    v5.x+=stereo.x*(v5.w-stereo.y);
  } else {
    v5.x+=prev.x*(v5.w-prev.y);
  }
  
  r0.xy = v4.xy / v4.ww;
  r0.zw = v5.xy / v5.ww;
  r1.xy = r0.xw + -r0.zy;
  r0.xy = r1.xy * float2(0.5,0.5) + float2(0.5,0.5);
  r0.zw = r0.xy * r0.xy;
  o1.xy = r0.xy * r0.zw;
  o2.x = 1;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v1.3.16 on Sun Dec 25 20:58:52 2022
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float
// TEXCOORD                 0   xy          1     NONE   float
// COLOR                    0   xyzw        2     NONE   float
// POSITION                 0   xyz         3     NONE   float
// POSITION                 1   xyzw        4     NONE   float   xy w
// POSITION                 2   xyzw        5     NONE   float   xy w
// NORMALS                  0   xyz         6     NONE   float
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                1   xyzw        1   TARGET   float   xy
// SV_Target                2   x           2   TARGET   float   x
//
ps_4_0
dcl_input_ps linear v4.xyw
dcl_input_ps linear v5.xyw
dcl_output o1.xy
dcl_output o2.x
dcl_temps 2
div r0.xy, v4.xyxx, v4.wwww
div r0.zw, v5.xxxy, v5.wwww
add r1.xy, -r0.zyzz, r0.xwxx
mad r0.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mul r0.zw, r0.xxxy, r0.xxxy
mul o1.xy, r0.zwzz, r0.xyxx
mov o2.x, l(1.000000)
ret
// Approximately 8 instruction slots used

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