// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.164 on Mon Jul 20 01:16:03 2026
//
//
// Buffer Definitions:
//
// cbuffer cb1
// {
//
//   float4 cb1[8];                     // Offset:    0 Size:   128
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0[23];                    // Offset:    0 Size:   368
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// s0_s                              sampler      NA          NA    0        1
// s1_s                              sampler      NA          NA    1        1
// s2_s                              sampler      NA          NA    2        1
// s3_s                              sampler      NA          NA    3        1
// t0                                texture  float4          2d    0        1
// t1                                texture  float4          2d    1        1
// t2                                texture  float4          2d    2        1
// t3                                texture  float4          2d    3        1
// t4                                texture  float4          2d    4        1
// t5                                texture  float4          2d    5        1
// t6                                texture  float4          2d    6        1
// StereoParams                      texture  float4          2d  125        1
// cb0                               cbuffer      NA          NA    0        1
// cb1                               cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy
// TEXCOORD                 0   xy          1     NONE   float   xy
// TEXCOORD                 1     zw        1     NONE   float     zw
//
//
// 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 CB1[8], immediateIndexed
dcl_constantbuffer CB0[23], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, 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_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_buffer (float,float,float,float) t125
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v1.zw
dcl_output o0.xyzw
dcl_temps 6
sample_l_indexable(texture2d)(float,float,float,float) r0.x, v1.zwzz, t1.xyzw, s1, l(0.000000)
mad r0.x, cb1[7].x, r0.x, cb1[7].y
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
lt r0.x, l(0.999000), r0.x
if_nz r0.x
  sample_indexable(texture2d)(float,float,float,float) o0.xyzw, v1.zwzz, t0.xyzw, s0
  ret
endif
ld_indexable(buffer)(float,float,float,float) r0.xy, l(0, 0, 0, 0), t125.xyzw
round_z r0.zw, v0.xxxy
ftoi r1.xy, r0.zwzz
mov r1.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r0.z, r1.xyww, t3.xywz
ld_indexable(texture2d)(float,float,float,float) r2.xyzw, r1.xyww, t4.xyzw
ld_indexable(texture2d)(float,float,float,float) r1.xyz, r1.xyzw, t5.xyzw
max r0.w, r2.y, r2.x
max r0.w, r2.z, r0.w
add r0.w, -r0.w, l(1.000000)
mad r1.xyz, r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r1.w, v1.xyxx, t1.yzwx, s1, l(0.000000)
mad r3.xy, v1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
add r3.x, -r0.x, r3.x
mul r4.xyzw, r3.yyyy, cb0[15].xyzw
mad r3.xyzw, cb0[14].xyzw, r3.xxxx, r4.xyzw
mad r3.xyzw, cb0[16].xyzw, r1.wwww, r3.xyzw
add r3.xyzw, r3.xyzw, cb0[17].xyzw
div r3.xyz, r3.xyzx, r3.wwww
dp3 r1.w, r3.xyzx, r3.xyzx
rsq r1.w, r1.w
mul r3.xyz, r3.xyzx, r1.wwww
mul r4.xyz, r3.yyyy, cb0[11].xyzx
mad r4.xyz, cb0[10].xyzx, r3.xxxx, r4.xyzx
mad r3.xyz, cb0[12].xyzx, r3.zzzz, r4.xyzx
add r1.w, -r2.w, l(1.000000)
mul r4.x, r1.w, r1.w
add r4.y, cb0[22].w, l(-1.000000)
mad r4.y, r4.x, r4.y, l(1.000000)
mad r0.y, -r0.y, r3.w, l(1.000000)
mul r0.x, r0.y, r0.x
mad r0.x, -r0.x, l(0.500000), v1.z
mov r0.y, v1.w
sample_l_indexable(texture2d)(float,float,float,float) r5.xyzw, r0.xyxx, t6.xyzw, s3, r4.y
dp3 r0.x, -r3.xyzx, r1.xyzx
add r0.y, r0.x, r0.x
mad r1.xyz, r1.xyzx, -r0.yyyy, -r3.xyzx
dp3 r0.y, r1.xyzx, r1.xyzx
rsq r0.y, r0.y
mul r1.xyz, r1.xyzx, r0.yyyy
dp3 r0.y, -r3.xyzx, r1.xyzx
max r1.x, r4.x, l(0.002000)
mul r1.x, r1.x, l(0.280000)
mad r1.x, -r1.x, r1.w, l(1.000000)
add r0.w, -r0.w, r2.w
add_sat r0.w, r0.w, l(1.000000)
mul r1.xyz, r5.xyzx, r1.xxxx
add r0.x, -|r0.x|, l(1.000000)
mul r1.w, r0.x, r0.x
mul r1.w, r1.w, r1.w
mul r0.x, r0.x, r1.w
add r3.xyz, -r2.xyzx, r0.wwww
mad r2.xyz, r0.xxxx, r3.xyzx, r2.xyzx
sample_indexable(texture2d)(float,float,float,float) r3.xyz, v1.zwzz, t2.xyzw, s2
sample_indexable(texture2d)(float,float,float,float) r4.xyzw, v1.zwzz, t0.xyzw, s0
add r4.xyz, -r3.xyzx, r4.xyzx
max r4.xyz, r4.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r0.x, r5.w, r5.w
mul r0.w, r0.x, l(3.000000)
mad r0.x, r0.x, l(3.000000), l(-0.500000)
add_sat r0.xy, r0.xyxx, r0.xyxx
mad r1.w, r0.x, l(-2.000000), l(3.000000)
mul r0.x, r0.x, r0.x
mul r0.x, r0.x, r1.w
mul r0.x, r0.x, r0.w
mul_sat r0.x, r0.x, cb0[22].y
add r0.x, -r0.x, l(1.000000)
mul r0.x, r0.y, r0.x
mad r1.xyz, r1.xyzx, r2.xyzx, -r3.xyzx
mad r0.xyw, r0.xxxx, r1.xyxz, r3.xyxz
mad o0.xyz, r0.xywx, r0.zzzz, r4.xyzx
mov o0.w, r4.w
ret
// Approximately 81 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v0.6.164 on Mon Jul 20 01:16:03 2026
//
// cbuffer cb1 : register(b1)
// {
//   float4 cb1[8] : packoffset(c0);
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[23] : packoffset(c0);
// }
//
// SamplerState s0_s_s : register(s0);
// SamplerState s1_s_s : register(s1);
// SamplerState s2_s_s : register(s2);
// SamplerState s3_s_s : register(s3);
// Texture2D<float4> t0 : register(t0);
// Texture2D<float4> t1 : register(t1);
// Texture2D<float4> t2 : register(t2);
// Texture2D<float4> t3 : register(t3);
// Texture2D<float4> t4 : register(t4);
// Texture2D<float4> t5 : register(t5);
// Texture2D<float4> t6 : register(t6);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_POSITION0,
//   float2 v1 : TEXCOORD0,
//   float2 w1 : TEXCOORD1,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0,r1,r2,r3,r4,r5;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.x = t1.SampleLevel(s1_s_s, w1.xy, 0).x;
//   r0.x = cb1[7].x * r0.x + cb1[7].y;
//   r0.x = 1 / r0.x;
//   r0.x = cmp(0.999000013 < r0.x);
//   if (r0.x != 0) {
//     o0.xyzw = t0.Sample(s0_s_s, w1.xy).xyzw;
//     return;
//   }
//   r0.xy = StereoParams.Load(float4(0,0,0,0)).xy;
//   r0.zw = trunc(v0.xy);
//   r1.xy = (int2)r0.zw;
//   r1.zw = float2(0,0);
//   r0.z = t3.Load(r1.xyw).w;
//   r2.xyzw = t4.Load(r1.xyw).xyzw;
//   r1.xyz = t5.Load(r1.xyz).xyz;
//   r0.w = max(r2.x, r2.y);
//   r0.w = max(r0.w, r2.z);
//   r0.w = 1 + -r0.w;
//   r1.xyz = r1.xyz * float3(2,2,2) + float3(-1,-1,-1);
//   r1.w = t1.SampleLevel(s1_s_s, v1.xy, 0).x;
//   r3.xy = v1.xy * float2(2,2) + float2(-1,-1);
//   r3.x = r3.x + -r0.x;
//   r4.xyzw = cb0[15].xyzw * r3.yyyy;
//   r3.xyzw = cb0[14].xyzw * r3.xxxx + r4.xyzw;
//   r3.xyzw = cb0[16].xyzw * r1.wwww + r3.xyzw;
//   r3.xyzw = cb0[17].xyzw + r3.xyzw;
//   r3.xyz = r3.xyz / r3.www;
//   r1.w = dot(r3.xyz, r3.xyz);
//   r1.w = rsqrt(r1.w);
//   r3.xyz = r1.www * r3.xyz;
//   r4.xyz = cb0[11].xyz * r3.yyy;
//   r4.xyz = cb0[10].xyz * r3.xxx + r4.xyz;
//   r3.xyz = cb0[12].xyz * r3.zzz + r4.xyz;
//   r1.w = 1 + -r2.w;
//   r4.x = r1.w * r1.w;
//   r4.y = -1 + cb0[22].w;
//   r4.y = r4.x * r4.y + 1;
//   r0.y = -r0.y * r3.w + 1;
//   r0.x = r0.x * r0.y;
//   r0.x = -r0.x * 0.5 + w1.x;
//   r0.y = w1.y;
//   r5.xyzw = t6.SampleLevel(s3_s_s, r0.xy, r4.y).xyzw;
//   r0.x = dot(-r3.xyz, r1.xyz);
//   r0.y = r0.x + r0.x;
//   r1.xyz = r1.xyz * -r0.yyy + -r3.xyz;
//   r0.y = dot(r1.xyz, r1.xyz);
//   r0.y = rsqrt(r0.y);
//   r1.xyz = r0.yyy * r1.xyz;
//   r0.y = dot(-r3.xyz, r1.xyz);
//   r1.x = max(0.00200000009, r4.x);
//   r1.x = 0.280000001 * r1.x;
//   r1.x = -r1.x * r1.w + 1;
//   r0.w = r2.w + -r0.w;
//   r0.w = saturate(1 + r0.w);
//   r1.xyz = r1.xxx * r5.xyz;
//   r0.x = 1 + -abs(r0.x);
//   r1.w = r0.x * r0.x;
//   r1.w = r1.w * r1.w;
//   r0.x = r1.w * r0.x;
//   r3.xyz = r0.www + -r2.xyz;
//   r2.xyz = r0.xxx * r3.xyz + r2.xyz;
//   r3.xyz = t2.Sample(s2_s_s, w1.xy).xyz;
//   r4.xyzw = t0.Sample(s0_s_s, w1.xy).xyzw;
//   r4.xyz = r4.xyz + -r3.xyz;
//   r4.xyz = max(float3(0,0,0), r4.xyz);
//   r0.x = r5.w * r5.w;
//   r0.w = 3 * r0.x;
//   r0.x = r0.x * 3 + -0.5;
//   r0.xy = saturate(r0.xy + r0.xy);
//   r1.w = r0.x * -2 + 3;
//   r0.x = r0.x * r0.x;
//   r0.x = r1.w * r0.x;
//   r0.x = r0.w * r0.x;
//   r0.x = saturate(cb0[22].y * r0.x);
//   r0.x = 1 + -r0.x;
//   r0.x = r0.x * r0.y;
//   r1.xyz = r1.xyz * r2.xyz + -r3.xyz;
//   r0.xyw = r0.xxx * r1.xyz + r3.xyz;
//   o0.xyz = r0.xyw * r0.zzz + r4.xyz;
//   o0.w = r4.w;
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
