// skip regex
TextureCube<float4> t4 : register(t4);

Texture2D<float4> t3 : register(t3);

Texture2D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s4_s : register(s4);

SamplerState s3_s : register(s3);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb2 : register(b2)
{
  float4 cb2[7];
}

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

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




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


void main(
  float4 v0 : SV_POSITION0,
  float4 v1 : TEXCOORD0,
  float3 v2 : TEXCOORD1,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = cb0[5].z / v2.z;
  r0.xyz = v2.xyz * r0.xxx;
  r1.xy = v1.xy / v1.ww;
  r2.xyzw = t0.Sample(s1_s, r1.xy).xyzw;
  r0.w = cb0[7].x * r2.x + cb0[7].y;
  r0.w = 1 / r0.w;
  r0.xyz = r0.xyz * r0.www;
  r2.xyz = cb1[19].xyz * r0.yyy;
  r0.xyw = cb1[18].xyz * r0.xxx + r2.xyz;
  r0.xyz = cb1[20].xyz * r0.zzz + r0.xyw;
  r0.xyz = cb1[21].xyz + r0.xyz;
  r2.xyzw = t1.Sample(s2_s, r1.xy).xyzw;
  r3.xyzw = t2.Sample(s3_s, r1.xy).xyzw;
  r1.xyzw = t3.Sample(s4_s, r1.xy).xyzw;
  r1.xyz = r1.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r0.w = dot(r1.xyz, r1.xyz);
  r0.w = rsqrt(r0.w);
  r1.xyz = r1.xyz * r0.www;
  r2.xyz = -cb0[4].xyz + r0.xyz;
  r0.w = dot(r2.xyz, r2.xyz);
  r0.w = rsqrt(r0.w);
  r2.xyz = r2.xyz * r0.www;
  r0.w = max(r3.x, r3.y);
  r0.w = max(r0.w, r3.z);
  r0.w = 1 + -r0.w;
  r1.w = 1 + -r3.w;
  r4.x = dot(r2.xyz, r1.xyz);
  r4.x = r4.x + r4.x;
  r4.xyz = r1.xyz * -r4.xxx + r2.xyz;
  r4.w = cmp(0 < cb2[2].w);
  if (r4.w != 0) {
    r5.xyz = -cb2[6].www + cb2[1].xyz;
    r6.xyz = cb2[6].www + cb2[0].xyz;
    r4.w = dot(r4.xyz, r4.xyz);
    r4.w = rsqrt(r4.w);
    r7.xyz = r4.xyz * r4.www;
    r6.xyz = r6.xyz + -r0.xyz;
    r6.xyz = r6.xyz / r7.xyz;
    r5.xyz = r5.xyz + -r0.xyz;
    r5.xyz = r5.xyz / r7.xyz;
    r8.xyz = cmp(float3(0,0,0) < r7.xyz);
    r5.xyz = r8.xyz ? r6.xyz : r5.xyz;
    r4.w = min(r5.x, r5.y);
    r4.w = min(r4.w, r5.z);
    r5.xyz = -cb2[2].xyz + r0.xyz;
    r4.xyz = r7.xyz * r4.www + r5.xyz;
  }
  r4.w = -r1.w * 0.699999988 + 1.70000005;
  r4.w = r4.w * r1.w;
  r4.w = 6 * r4.w;
  r4.xyzw = t4.SampleLevel(s0_s, r4.xyz, r4.w).xyzw;
  r4.w = -1 + r4.w;
  r4.w = cb2[3].w * r4.w + 1;
  r4.w = cb2[3].x * r4.w;
  r4.xyz = r4.www * r4.xyz;
  r4.xyz = r4.xyz * r2.www;
  r1.x = dot(r1.xyz, -r2.xyz);
  r1.y = r1.w * r1.w;
  r1.y = max(0.00200000009, r1.y);
  r1.y = 0.280000001 * r1.y;
  r1.y = -r1.y * r1.w + 1;
  r0.w = 1 + -r0.w;
  r0.w = saturate(r3.w + r0.w);
  r1.yzw = r1.yyy * r4.xyz;
  r1.x = 1 + -abs(r1.x);
  r2.x = r1.x * r1.x;
  r2.x = r2.x * r2.x;
  r1.x = r2.x * r1.x;
  r2.xyz = r0.www + -r3.xyz;
  r2.xyz = r1.xxx * r2.xyz + r3.xyz;
  o0.xyz = r2.xyz * r1.yzw;
  r1.xyz = -cb2[0].xyz + r0.xyz;
  r0.xyz = cb2[1].xyz + -r0.xyz;
  r0.xyz = max(r1.xyz, r0.xyz);
  r0.xyz = max(float3(0,0,0), r0.xyz);
  r0.x = dot(r0.xyz, r0.xyz);
  r0.x = sqrt(r0.x);
  r0.x = r0.x / cb2[6].w;
  o0.w = saturate(1 + -r0.x);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.7.9 on Fri Jul 10 16:03:34 2026
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// TEXCOORD                 0   xyzw        1     NONE   float   xy w
// TEXCOORD                 1   xyz         2     NONE   float   xyz
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer CB0[8], immediateIndexed
dcl_constantbuffer CB1[22], immediateIndexed
dcl_constantbuffer CB2[7], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, 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_resource_texture2d (float,float,float,float) t3
dcl_resource_texturecube (float,float,float,float) t4
dcl_input_ps linear v1.xyw
dcl_input_ps linear v2.xyz
dcl_output o0.xyzw
dcl_temps 9
div r0.x, cb0[5].z, v2.z
mul r0.xyz, r0.xxxx, v2.xyzx
div r1.xy, v1.xyxx, v1.wwww
sample r2.xyzw, r1.xyxx, t0.xyzw, s1
mad r0.w, cb0[7].x, r2.x, cb0[7].y
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
mul r0.xyz, r0.wwww, r0.xyzx
mul r2.xyz, r0.yyyy, cb1[19].xyzx
mad r0.xyw, cb1[18].xyxz, r0.xxxx, r2.xyxz
mad r0.xyz, cb1[20].xyzx, r0.zzzz, r0.xywx
add r0.xyz, r0.xyzx, cb1[21].xyzx
sample r2.xyzw, r1.xyxx, t1.xyzw, s2
sample r3.xyzw, r1.xyxx, t2.xyzw, s3
sample r1.xyzw, r1.xyxx, t3.xyzw, s4
mad r1.xyz, r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r0.w, r1.xyzx, r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, r1.xyzx
add r2.xyz, r0.xyzx, -cb0[4].xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
max r0.w, r3.y, r3.x
max r0.w, r3.z, r0.w
add r0.w, -r0.w, l(1.000000)
add r1.w, -r3.w, l(1.000000)
dp3 r4.x, r2.xyzx, r1.xyzx
add r4.x, r4.x, r4.x
mad r4.xyz, r1.xyzx, -r4.xxxx, r2.xyzx
lt r4.w, l(0.000000), cb2[2].w
if_nz r4.w
  add r5.xyz, cb2[1].xyzx, -cb2[6].wwww
  add r6.xyz, cb2[0].xyzx, cb2[6].wwww
  dp3 r4.w, r4.xyzx, r4.xyzx
  rsq r4.w, r4.w
  mul r7.xyz, r4.wwww, r4.xyzx
  add r6.xyz, -r0.xyzx, r6.xyzx
  div r6.xyz, r6.xyzx, r7.xyzx
  add r5.xyz, -r0.xyzx, r5.xyzx
  div r5.xyz, r5.xyzx, r7.xyzx
  lt r8.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r7.xyzx
  movc r5.xyz, r8.xyzx, r6.xyzx, r5.xyzx
  min r4.w, r5.y, r5.x
  min r4.w, r5.z, r4.w
  add r5.xyz, r0.xyzx, -cb2[2].xyzx
  mad r4.xyz, r7.xyzx, r4.wwww, r5.xyzx
endif
mad r4.w, -r1.w, l(0.700000), l(1.700000)
mul r4.w, r1.w, r4.w
mul r4.w, r4.w, l(6.000000)
sample_l r4.xyzw, r4.xyzx, t4.xyzw, s0, r4.w
add r4.w, r4.w, l(-1.000000)
mad r4.w, cb2[3].w, r4.w, l(1.000000)
mul r4.w, r4.w, cb2[3].x
mul r4.xyz, r4.xyzx, r4.wwww
mul r4.xyz, r2.wwww, r4.xyzx
dp3 r1.x, r1.xyzx, -r2.xyzx
mul r1.y, r1.w, r1.w
max r1.y, r1.y, l(0.002000)
mul r1.y, r1.y, l(0.280000)
mad r1.y, -r1.y, r1.w, l(1.000000)
add r0.w, -r0.w, l(1.000000)
add_sat r0.w, r0.w, r3.w
mul r1.yzw, r4.xxyz, r1.yyyy
add r1.x, -|r1.x|, l(1.000000)
mul r2.x, r1.x, r1.x
mul r2.x, r2.x, r2.x
mul r1.x, r1.x, r2.x
add r2.xyz, -r3.xyzx, r0.wwww
mad r2.xyz, r1.xxxx, r2.xyzx, r3.xyzx
mul o0.xyz, r1.yzwy, r2.xyzx
add r1.xyz, r0.xyzx, -cb2[0].xyzx
add r0.xyz, -r0.xyzx, cb2[1].xyzx
max r0.xyz, r0.xyzx, r1.xyzx
max r0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
dp3 r0.x, r0.xyzx, r0.xyzx
sqrt r0.x, r0.x
div r0.x, r0.x, cb2[6].w
add_sat o0.w, -r0.x, l(1.000000)
ret
// Approximately 0 instruction slots used

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