// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.109 on Sun Feb 22 12:25:37 2026
//
//
// Buffer Definitions:
//
// cbuffer cb2
// {
//
//   float4 cb2[7];                     // Offset:    0 Size:   112
//
// }
//
// cbuffer cb1
// {
//
//   float4 cb1[22];                    // Offset:    0 Size:   352
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0[8];                     // Offset:    0 Size:   128
//
// }
//
// cbuffer cb13
// {
//
//   float4 cb13[20];                   // Offset:    0 Size:   320
//
// }
//
//
// 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
// s4_s                              sampler      NA          NA    4        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        cube    4        1
// StereoParams                      texture  float4          2d  125        1
// cb0                               cbuffer      NA          NA    0        1
// cb1                               cbuffer      NA          NA    1        1
// cb2                               cbuffer      NA          NA    2        1
// cb13                              cbuffer      NA          NA   13        1
//
//
//
// 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 CB2[7], immediateIndexed
dcl_constantbuffer CB1[22], immediateIndexed
dcl_constantbuffer CB0[8], immediateIndexed
dcl_constantbuffer CB13[20], 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_resource_buffer (float,float,float,float) t125
dcl_input_ps linear v1.xyw
dcl_input_ps linear v2.xyz
dcl_output o0.xyzw
dcl_temps 7
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
ld r2.xyzw, l(0, 0, 0, 0), t125.xyzw
mad r1.z, r0.z, r0.w, -r2.y
mul r0.xyz, r0.wwww, r0.xyzx
mul r0.w, r1.z, r2.x
mul r1.z, r2.y, r2.x
mul r1.w, cb13[18].x, cb13[18].x
mad r1.w, cb13[17].x, cb13[17].x, r1.w
mad r1.w, cb13[19].x, cb13[19].x, r1.w
rsq r1.w, r1.w
mad r0.x, -r0.w, r1.w, r0.x
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
add r2.xyz, r0.xyzx, -cb0[4].xyzx
mul r0.w, r1.z, cb13[9].x
div r0.w, r0.w, r1.w
add r3.x, -r0.w, r2.x
mul r0.w, r1.z, cb13[10].x
mul r1.z, r1.z, cb13[11].x
div r1.z, r1.z, r1.w
div r0.w, r0.w, r1.w
add r3.y, -r0.w, r2.y
add r3.z, -r1.z, r2.z
dp3 r0.w, r3.xyzx, r3.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r3.xyzx
sample r3.xyzw, r1.xyxx, t3.xyzw, s4
mad r3.xyz, r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r0.w, r3.w, l(3.000000), l(0.500000)
round_ni r0.w, r0.w
eq r0.w, r0.w, l(2.000000)
dp3 r1.z, r3.xyzx, r3.xyzx
rsq r1.z, r1.z
mul r3.xyz, r1.zzzz, r3.xyzx
dp3 r1.z, r2.xyzx, r3.xyzx
add r1.z, r1.z, r1.z
mad r4.xyz, r3.xyzx, -r1.zzzz, r2.xyzx
dp3 r1.z, r3.xyzx, -r2.xyzx
add r1.z, -|r1.z|, l(1.000000)
dp3 r1.w, r4.xyzx, r4.xyzx
rsq r1.w, r1.w
mul r2.xyz, r1.wwww, r4.xyzx
add r3.xyz, cb2[0].xyzx, cb2[6].wwww
add r3.xyz, -r0.xyzx, r3.xyzx
div r3.xyz, r3.xyzx, r2.xyzx
add r5.xyz, cb2[1].xyzx, -cb2[6].wwww
add r5.xyz, -r0.xyzx, r5.xyzx
div r5.xyz, r5.xyzx, r2.xyzx
lt r6.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r2.xyzx
movc r3.xyz, r6.xyzx, r3.xyzx, r5.xyzx
min r1.w, r3.y, r3.x
min r1.w, r3.z, r1.w
add r3.xyz, r0.xyzx, -cb2[2].xyzx
mad r2.xyz, r2.xyzx, r1.wwww, r3.xyzx
lt r1.w, l(0.000000), cb2[2].w
movc r2.xyz, r1.wwww, r2.xyzx, r4.xyzx
sample r3.xyzw, r1.xyxx, t2.xzwy, s3
sample r4.xyzw, r1.xyxx, t1.xyzw, s2
add r1.x, -r3.z, l(1.000000)
mad r1.y, r1.x, l(-0.700000), l(1.700000)
mul r1.y, r1.x, r1.y
mul r1.x, r1.x, r1.x
mad r1.x, r1.x, r1.x, l(1.000000)
div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
mul r1.y, r1.y, l(6.000000)
sample_l r2.xyzw, r2.xyzx, t4.xyzw, s0, r1.y
add r1.y, r2.w, l(-1.000000)
mad r1.y, cb2[3].w, r1.y, l(1.000000)
log r1.y, r1.y
mul r1.y, r1.y, cb2[3].y
exp r1.y, r1.y
mul r1.y, r1.y, cb2[3].x
mul r2.xyz, r2.xyzx, r1.yyyy
and r1.y, r0.w, l(0x3f800000)
movc r5.xyz, r0.wwww, r3.xxxx, r3.xwyx
mul r0.w, r3.x, r1.y
eq r0.w, r0.w, l(1.000000)
mov r3.x, l(0.040000)
mov r5.w, l(1.000000)
movc r5.xyzw, r0.wwww, r3.xxxw, r5.xyzw
add_sat r0.w, r5.w, l(0.500000)
mul r0.w, r0.w, r4.w
mul r2.xyz, r0.wwww, r2.xyzx
mul r1.xyw, r1.xxxx, r2.xyxz
max r0.w, r5.y, r5.x
max r0.w, r5.z, r0.w
add r0.w, -r0.w, l(1.000000)
add r0.w, -r0.w, r3.z
add_sat r0.w, r0.w, l(1.000000)
add r2.xyz, -r5.xyzx, r0.wwww
mul r0.w, r1.z, r1.z
mul r0.w, r0.w, r0.w
mul r0.w, r1.z, r0.w
mad r2.xyz, r0.wwww, r2.xyzx, r5.xyzx
mul o0.xyz, r1.xywx, 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 111 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v0.6.109 on Sun Feb 22 12:25:37 2026
//
// cbuffer cb2 : register(b2)
// {
//   float4 cb2[7] : packoffset(c0);
// }
//
// cbuffer cb1 : register(b1)
// {
//   float4 cb1[22] : packoffset(c0);
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[8] : packoffset(c0);
// }
//
// cbuffer cb13 : register(b13)
// {
//   float4 cb13[20] : 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);
// SamplerState s4_s_s : register(s4);
// Texture2D<float4> t0 : register(t0);
// Texture2D<float4> t1 : register(t1);
// Texture2D<float4> t2 : register(t2);
// Texture2D<float4> t3 : register(t3);
// TextureCube<float4> t4 : register(t4);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<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;
//   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_s, r1.xy).xyzw;
//   r0.w = cb0[7].x * r2.x + cb0[7].y;
//   r0.w = 1 / r0.w;
//   r2.xyzw = StereoParams.Load(float4(0,0,0,0)).xyzw;
//   r1.z = r0.z * r0.w + -r2.y;
//   r0.xyz = r0.xyz * r0.www;
//   r0.w = r2.x * r1.z;
//   r1.z = r2.x * r2.y;
//   r1.w = cb13[18].x * cb13[18].x;
//   r1.w = cb13[17].x * cb13[17].x + r1.w;
//   r1.w = cb13[19].x * cb13[19].x + r1.w;
//   r1.w = rsqrt(r1.w);
//   r0.x = -r0.w * r1.w + r0.x;
//   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.xyz = -cb0[4].xyz + r0.xyz;
//   r0.w = cb13[9].x * r1.z;
//   r0.w = r0.w / r1.w;
//   r3.x = r2.x + -r0.w;
//   r0.w = cb13[10].x * r1.z;
//   r1.z = cb13[11].x * r1.z;
//   r1.z = r1.z / r1.w;
//   r0.w = r0.w / r1.w;
//   r3.y = r2.y + -r0.w;
//   r3.z = r2.z + -r1.z;
//   r0.w = dot(r3.xyz, r3.xyz);
//   r0.w = rsqrt(r0.w);
//   r2.xyz = r3.xyz * r0.www;
//   r3.xyzw = t3.Sample(s4_s_s, r1.xy).xyzw;
//   r3.xyz = r3.xyz * float3(2,2,2) + float3(-1,-1,-1);
//   r0.w = r3.w * 3 + 0.5;
//   r0.w = floor(r0.w);
//   r0.w = cmp(r0.w == 2.000000);
//   r1.z = dot(r3.xyz, r3.xyz);
//   r1.z = rsqrt(r1.z);
//   r3.xyz = r3.xyz * r1.zzz;
//   r1.z = dot(r2.xyz, r3.xyz);
//   r1.z = r1.z + r1.z;
//   r4.xyz = r3.xyz * -r1.zzz + r2.xyz;
//   r1.z = dot(r3.xyz, -r2.xyz);
//   r1.z = 1 + -abs(r1.z);
//   r1.w = dot(r4.xyz, r4.xyz);
//   r1.w = rsqrt(r1.w);
//   r2.xyz = r4.xyz * r1.www;
//   r3.xyz = cb2[6].www + cb2[0].xyz;
//   r3.xyz = r3.xyz + -r0.xyz;
//   r3.xyz = r3.xyz / r2.xyz;
//   r5.xyz = -cb2[6].www + cb2[1].xyz;
//   r5.xyz = r5.xyz + -r0.xyz;
//   r5.xyz = r5.xyz / r2.xyz;
//   r6.xyz = cmp(float3(0,0,0) < r2.xyz);
//   r3.xyz = r6.xyz ? r3.xyz : r5.xyz;
//   r1.w = min(r3.x, r3.y);
//   r1.w = min(r1.w, r3.z);
//   r3.xyz = -cb2[2].xyz + r0.xyz;
//   r2.xyz = r2.xyz * r1.www + r3.xyz;
//   r1.w = cmp(0 < cb2[2].w);
//   r2.xyz = r1.www ? r2.xyz : r4.xyz;
//   r3.xyzw = t2.Sample(s3_s_s, r1.xy).xzwy;
//   r4.xyzw = t1.Sample(s2_s_s, r1.xy).xyzw;
//   r1.x = 1 + -r3.z;
//   r1.y = r1.x * -0.699999988 + 1.70000005;
//   r1.y = r1.y * r1.x;
//   r1.x = r1.x * r1.x;
//   r1.x = r1.x * r1.x + 1;
//   r1.x = 1 / r1.x;
//   r1.y = 6 * r1.y;
//   r2.xyzw = t4.SampleLevel(s0_s_s, r2.xyz, r1.y).xyzw;
//   r1.y = -1 + r2.w;
//   r1.y = cb2[3].w * r1.y + 1;
//   r1.y = log2(r1.y);
//   r1.y = cb2[3].y * r1.y;
//   r1.y = exp2(r1.y);
//   r1.y = cb2[3].x * r1.y;
//   r2.xyz = r1.yyy * r2.xyz;
//   r1.y = r0.w ? 1.000000 : 0;
//   r5.xyz = r0.www ? r3.xxx : r3.xwy;
//   r0.w = r1.y * r3.x;
//   r0.w = cmp(r0.w == 1.000000);
//   r3.x = 0.0399999991;
//   r5.w = 1;
//   r5.xyzw = r0.wwww ? r3.xxxw : r5.xyzw;
//   r0.w = saturate(0.5 + r5.w);
//   r0.w = r4.w * r0.w;
//   r2.xyz = r2.xyz * r0.www;
//   r1.xyw = r2.xyz * r1.xxx;
//   r0.w = max(r5.x, r5.y);
//   r0.w = max(r0.w, r5.z);
//   r0.w = 1 + -r0.w;
//   r0.w = r3.z + -r0.w;
//   r0.w = saturate(1 + r0.w);
//   r2.xyz = r0.www + -r5.xyz;
//   r0.w = r1.z * r1.z;
//   r0.w = r0.w * r0.w;
//   r0.w = r0.w * r1.z;
//   r2.xyz = r0.www * r2.xyz + r5.xyz;
//   o0.xyz = r2.xyz * r1.xyw;
//   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;
// }
/////////////////////////////////////////////////////////////////////////////
