// ---- Created with 3Dmigoto v1.3.7 on Wed Nov 06 10:32:02 2019
Texture2D<float4> t0 : register(t0);

SamplerState s0_s : register(s0);

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




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


void main(
  float4 v0 : SV_Position0,
  float4 v1 : TEXCOORD0,
  float4 v2 : TEXCOORD1,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;
    float4 params = IniParams.Load(0);
  if (params.x == 0)
  {
    o0 = 0;                              
    return;
  } else {


  r0.xy = -cb0[20].yx + v1.yx;
  r0.z = min(abs(r0.x), abs(r0.y));
  r0.w = max(abs(r0.x), abs(r0.y));
  r0.w = 1 / r0.w;
  r0.z = r0.z * r0.w;
  r0.w = r0.z * r0.z;
  r1.x = r0.w * 0.0208350997 + -0.0851330012;
  r1.x = r0.w * r1.x + 0.180141002;
  r1.x = r0.w * r1.x + -0.330299497;
  r0.w = r0.w * r1.x + 0.999866009;
  r1.x = r0.z * r0.w;
  r1.y = cmp(abs(r0.y) < abs(r0.x));
  r1.x = r1.x * -2 + 1.57079637;
  r1.x = r1.y ? r1.x : 0;
  r0.z = r0.z * r0.w + r1.x;
  r0.w = cmp(r0.y < -r0.y);
  r0.w = r0.w ? -3.141593 : 0;
  r0.z = r0.z + r0.w;
  r0.w = min(r0.x, r0.y);
  r0.x = max(r0.x, r0.y);
  r0.y = cmp(r0.w < -r0.w);
  r0.x = cmp(r0.x >= -r0.x);
  r0.x = r0.x ? r0.y : 0;
  r0.x = r0.x ? -r0.z : r0.z;
  r0.y = cmp(cb0[20].z < cb0[20].w);
  if (r0.y != 0) {
    r0.y = cmp(cb0[20].z < r0.x);
    r0.z = cmp(r0.x < cb0[20].w);
    r0.y = r0.z ? r0.y : 0;
  } else {
    r0.z = cmp(r0.x < cb0[20].w);
    r0.x = cmp(cb0[20].z < r0.x);
    r0.y = (int)r0.x | (int)r0.z;
  }
  if (r0.y != 0) {
    r0.xyzw = t0.Sample(s0_s, v1.xy, int2(0, 0)).xyzw;
    r1.x = r0.w * v2.w + -cb0[19].x;
    r1.x = -0.00300000003 + r1.x;
    r1.x = cmp(r1.x < 0);
    if (r1.x != 0) discard;
    r1.x = cb0[6].x + r0.w;
    r1.x = min(1, r1.x);
    r1.xyz = r1.xxx * r0.xyz;
    r0.xyz = v2.xyz * r1.xyz;
    o0.xyzw = v2.wwww * r0.xyzw;
    return;
  }
  if (-1 != 0) discard;
  o0.xyzw = float4(0,0,0,0);
  return;
  }
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.7 on Wed Nov 06 10:32:02 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float
// TEXCOORD                 0   xy          1     NONE   float   xy
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
//
//
// 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[21], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyzw
dcl_output o0.xyzw
dcl_temps 2
add r0.xy, v1.yxyy, -cb0[20].yxyy
min r0.z, |r0.y|, |r0.x|
max r0.w, |r0.y|, |r0.x|
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
mul r0.z, r0.w, r0.z
mul r0.w, r0.z, r0.z
mad r1.x, r0.w, l(0.0208350997), l(-0.085133)
mad r1.x, r0.w, r1.x, l(0.180141)
mad r1.x, r0.w, r1.x, l(-0.330299497)
mad r0.w, r0.w, r1.x, l(0.999866)
mul r1.x, r0.w, r0.z
lt r1.y, |r0.y|, |r0.x|
mad r1.x, r1.x, l(-2.000000), l(1.57079637)
and r1.x, r1.y, r1.x
mad r0.z, r0.z, r0.w, r1.x
lt r0.w, r0.y, -r0.y
and r0.w, r0.w, l(0xc0490fdb)
add r0.z, r0.w, r0.z
min r0.w, r0.y, r0.x
max r0.x, r0.y, r0.x
lt r0.y, r0.w, -r0.w
ge r0.x, r0.x, -r0.x
and r0.x, r0.x, r0.y
movc r0.x, r0.x, -r0.z, r0.z
lt r0.y, cb0[20].z, cb0[20].w
if_nz r0.y
  lt r0.y, cb0[20].z, r0.x
  lt r0.z, r0.x, cb0[20].w
  and r0.y, r0.z, r0.y
else
  lt r0.z, r0.x, cb0[20].w
  lt r0.x, cb0[20].z, r0.x
  or r0.y, r0.x, r0.z
endif
if_nz r0.y
  sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r0.xyzw, v1.xyxx, t0.xyzw, s0
  mad r1.x, r0.w, v2.w, -cb0[19].x
  add r1.x, r1.x, l(-0.003000)
  lt r1.x, r1.x, l(0.000000)
  discard_nz r1.x
  add r1.x, r0.w, cb0[6].x
  min r1.x, r1.x, l(1.000000)
  mul r1.xyz, r0.xyzx, r1.xxxx
  mul r0.xyz, r1.xyzx, v2.xyzx
  mul o0.xyzw, r0.xyzw, v2.wwww
  ret
endif
discard_nz l(-1)
mov o0.xyzw, l(0,0,0,0)
ret
// Approximately 0 instruction slots used

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