//Radial blur PS. Shield power.
// ---- Created with geo-11 v0.6.193 on Sun May 26 18:05:53 2024

cbuffer PER_BATCH : register(b0)
{
  float4 psParams[16] : packoffset(c0);
}

SamplerState ssScreenTex_s : register(s0);
Texture2D<float4> screenTex : register(t0);


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


void main(
  float4 v0 : SV_Position0,
  float4 v1 : TEXCOORD0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  
  r0.x = psParams[1].y * psParams[1].y;
  r0.x = rcp(r0.x);
  r0.yz = v1.xy * float2(2,2) + float2(-1,-1);
  
  r0.y-=stereo.x;
  
  r1.yz = -psParams[0].zw + r0.yz;
  r1.x = psParams[1].z * r1.y;
  r0.w = dot(r1.xz, r1.xz);
  r0.w = r0.w * r0.w;
  r0.x = -r0.w * r0.x + 1;
  r0.w = 0.25 * abs(psParams[1].x);
  r0.x = r0.w * r0.x;
  r0.x = max(0, r0.x);
  r0.x = 1 + r0.x;
  r0.xy = r1.yz * r0.xx + -r0.yz;
  r0.xy = v1.xy + r0.xy;
  o0.xyzw = screenTex.Sample(ssScreenTex_s, r0.xy).xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v0.6.193 on Sun May 26 18:05:53 2024
//
//
// Buffer Definitions:
//
// cbuffer PER_BATCH
// {
//
//   float4 psParams[16];               // Offset:    0 Size:   256
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// ssScreenTex                       sampler      NA          NA    0        1
// screenTex                         texture  float4          2d    0        1
// PER_BATCH                         cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float
// TEXCOORD                 0   xyzw        1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[2], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 2
mul r0.x, cb0[1].y, cb0[1].y
rcp r0.x, r0.x
mad r0.yz, v1.xxyx, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
add r1.yz, r0.yyzy, -cb0[0].zzwz
mul r1.x, r1.y, cb0[1].z
dp2 r0.w, r1.xzxx, r1.xzxx
mul r0.w, r0.w, r0.w
mad r0.x, -r0.w, r0.x, l(1.000000)
mul r0.w, |cb0[1].x|, l(0.250000)
mul r0.x, r0.x, r0.w
max r0.x, r0.x, l(0.000000)
add r0.x, r0.x, l(1.000000)
mad r0.xy, r1.yzyy, r0.xxxx, -r0.yzyy
add r0.xy, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) o0.xyzw, r0.xyxx, t0.xyzw, s0
ret
// Approximately 16 instruction slots used

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