// ---- Created with 3Dmigoto v1.3.15 on Thu Dec 08 20:11:28 2022
Texture2D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb1 : register(b1)
{
  float4 cb1[1];
}

cbuffer cb0 : register(b0)
{
  float4 cb0[27];
}




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


void main(
  float4 v0 : SV_POSITION0,
  float4 v1 : COLOR0,
  float4 v2 : TEXCOORD0,
  float4 v3 : TEXCOORD1,
  float4 v4 : TEXCOORD2,
  float4 v5 : TEXCOORD3,
  float4 v6 : TEXCOORD5,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 params = IniParams.Load(0);
  if (params.x == 0)
  {
   o0 = 0;
   return;
  } else {

  r0.xyzw = t0.Sample(s2_s, v2.xy).xyzw;
  r0.x = -v3.x + r0.w;
  r0.y = v3.z + -r0.w;
  r0.x = cmp(r0.x < 0);
  if (r0.x != 0) discard;
  r0.x = cb0[22].w * cb0[6].x;
  r0.x = v3.y * r0.x;
  r0.z = min(1, r0.x);
  r0.x = 0.5 * r0.x;
  r0.z = sqrt(r0.z);
  r0.w = saturate(r0.y * v3.y + r0.x);
  r0.x = r0.y * v3.y + -r0.x;
  r0.y = r0.w * r0.z;
  r0.zw = cb0[4].zw * cb1[0].yy + v6.zw;
  r1.xyzw = t2.Sample(s1_s, r0.zw).xyzw;
  r1.xyzw = cb0[5].xyzw * r1.xyzw;
  r1.xyz = r1.xyz * r1.www;
  r2.xyz = cb0[3].xyz * v1.xyz;
  r0.zw = cb0[2].xy * cb1[0].yy + v6.xy;
  r3.xyzw = t1.Sample(s0_s, r0.zw).xyzw;
  r2.xyz = r3.xyz * r2.xyz;
  r3.w = cb0[3].w * r3.w;
  r3.xyz = r3.www * r2.xyz;
  r1.xyzw = -r3.xyzw + r1.xyzw;
  r1.xyzw = r0.yyyy * r1.xyzw + r3.xyzw;
  r0.y = cb0[22].w * cb0[4].y;
  r0.z = v3.y * r0.y;
  r0.y = r0.y * v3.y + 1;
  r0.x = r0.z * 0.5 + r0.x;
  r0.x = saturate(r0.x / r0.y);
  r0.x = 1 + -r0.x;
  r0.xyzw = r1.xyzw * r0.xxxx;
  r1.xy = cb0[26].zw + -cb0[26].xy;
  r1.xy = -abs(v4.xy) + r1.xy;
  r1.xy = saturate(v4.zw * r1.xy);
  r1.x = r1.x * r1.y;
  r0.xyzw = r1.xxxx * r0.xyzw;
  o0.xyzw = v1.wwww * r0.xyzw;
  return;
  }
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.15 on Thu Dec 08 20:11:28 2022
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy
// TEXCOORD                 1   xyzw        3     NONE   float   xyz
// TEXCOORD                 2   xyzw        4     NONE   float   xyzw
// TEXCOORD                 3   xyz         5     NONE   float
// TEXCOORD                 5   xyzw        6     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer cb0[27], immediateIndexed
dcl_constantbuffer cb1[1], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyzw
dcl_input_ps linear v6.xyzw
dcl_output o0.xyzw
dcl_temps 4
sample r0.xyzw, v2.xyxx, t0.xyzw, s2
add r0.x, r0.w, -v3.x
add r0.y, -r0.w, v3.z
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mul r0.x, cb0[6].x, cb0[22].w
mul r0.x, r0.x, v3.y
min r0.z, r0.x, l(1.000000)
mul r0.x, r0.x, l(0.500000)
sqrt r0.z, r0.z
mad_sat r0.w, r0.y, v3.y, r0.x
mad r0.x, r0.y, v3.y, -r0.x
mul r0.y, r0.z, r0.w
mad r0.zw, cb0[4].zzzw, cb1[0].yyyy, v6.zzzw
sample r1.xyzw, r0.zwzz, t2.xyzw, s1
mul r1.xyzw, r1.xyzw, cb0[5].xyzw
mul r1.xyz, r1.wwww, r1.xyzx
mul r2.xyz, v1.xyzx, cb0[3].xyzx
mad r0.zw, cb0[2].xxxy, cb1[0].yyyy, v6.xxxy
sample r3.xyzw, r0.zwzz, t1.xyzw, s0
mul r2.xyz, r2.xyzx, r3.xyzx
mul r3.w, r3.w, cb0[3].w
mul r3.xyz, r2.xyzx, r3.wwww
add r1.xyzw, r1.xyzw, -r3.xyzw
mad r1.xyzw, r0.yyyy, r1.xyzw, r3.xyzw
mul r0.y, cb0[4].y, cb0[22].w
mul r0.z, r0.y, v3.y
mad r0.y, r0.y, v3.y, l(1.000000)
mad r0.x, r0.z, l(0.500000), r0.x
div_sat r0.x, r0.x, r0.y
add r0.x, -r0.x, l(1.000000)
mul r0.xyzw, r0.xxxx, r1.xyzw
add r1.xy, -cb0[26].xyxx, cb0[26].zwzz
add r1.xy, r1.xyxx, -|v4.xyxx|
mul_sat r1.xy, r1.xyxx, v4.zwzz
mul r1.x, r1.y, r1.x
mul r0.xyzw, r0.xyzw, r1.xxxx
mul o0.xyzw, r0.xyzw, v1.wwww
ret
// Approximately 0 instruction slots used

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