// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.164 on Mon Jul 20 01:18:07 2026
//
//
// Buffer Definitions:
//
// cbuffer cb1
// {
//
//   float4 cb1[8];                     // Offset:    0 Size:   128
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0[9];                     // Offset:    0 Size:   144
//
// }
//
//
// 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
// t0                                texture  float4          2d    0        1
// t1                                texture  float4          2d    1        1
// t2                                texture  float4          3d    2        1
// t3                                texture  float4     2darray    3        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
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy
// SV_POSITION              0   xyzw        1      POS   float
//
//
// 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[9], 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_texture3d (float,float,float,float) t2
dcl_resource_texture2darray (float,float,float,float) t3
dcl_resource_buffer (float,float,float,float) t125
dcl_input_ps linear v0.xy
dcl_output o0.xyzw
dcl_temps 4
mul r0.xy, v0.xyxx, cb1[6].xyxx
resinfo_indexable(texture2darray)(float,float,float,float)_uint r1.xyz, l(0), t3.xyzw
utof r0.zw, r1.xxxy
mul r1.xy, r0.zwzz, r0.xyxx
ge r1.xy, r1.xyxx, -r1.xyxx
movc r1.xy, r1.xyxx, r0.zwzz, -r0.zwzz
div r2.xy, l(1.000000, 1.000000, 1.000000, 1.000000), r1.xyxx
mul r0.xy, r0.xyxx, r2.xyxx
frc r0.xy, r0.xyxx
mul r0.xy, r0.xyxx, r1.xyxx
ftou r0.xy, r0.xyxx
utof r0.xy, r0.xyxx
ftoi r2.xy, r0.xyxx
iadd r0.xy, cb0[7].wwww, l(3, 4, 0, 0)
itof r0.xy, r0.xyxx
ftou r0.xy, r0.xyxx
udiv null, r0.xy, r0.xyxx, r1.zzzz
utof r0.xy, r0.xyxx
ftoi r2.z, r0.x
ftoi r1.z, r0.y
mov r2.w, l(0)
ld_indexable(texture2darray)(float,float,float,float) r0.xy, r2.xyzw, t3.xyzw
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
lt r2.xy, l(0.000000, 0.000000, 0.000000, 0.000000), r0.xyxx
and r2.xy, r2.xyxx, l(1, 1, 0, 0)
lt r2.zw, r0.xxxy, l(0.000000, 0.000000, 0.000000, 0.000000)
add r0.xy, -|r0.xyxx|, l(1.000000, 1.000000, 0.000000, 0.000000)
sqrt r0.xy, r0.xyxx
add r0.xy, -r0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
iadd r2.xy, r2.zwzz, r2.xyxx
itof r2.xy, r2.xyxx
mul r0.xy, r0.xyxx, r2.xyxx
mad r2.yz, r0.xxyx, l(0.000000, 0.00392156886, 0.00392156886, 0.000000), v0.xxyx
mul r0.xy, r2.yzyy, cb1[6].xyxx
mul r3.xy, r0.zwzz, r0.xyxx
ge r3.xy, r3.xyxx, -r3.xyxx
movc r0.zw, r3.xxxy, r0.zzzw, -r0.zzzw
div r3.xy, l(1.000000, 1.000000, 1.000000, 1.000000), r0.zwzz
mul r0.xy, r0.xyxx, r3.xyxx
frc r0.xy, r0.xyxx
mul r0.xy, r0.xyxx, r0.zwzz
ftou r0.xy, r0.xyxx
utof r0.xy, r0.xyxx
ftoi r1.xy, r0.xyxx
mov r1.w, l(0)
ld_indexable(texture2darray)(float,float,float,float) r0.xyzw, r1.xyzw, t3.xyzw
mad r0.xyzw, r0.wxyz, l(2.000000, 2.000000, 2.000000, 2.000000), l(-1.000000, -1.000000, -1.000000, -1.000000)
lt r1.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000), r0.xyzw
and r1.xyzw, r1.xyzw, l(1, 1, 1, 1)
lt r3.xyzw, r0.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
add r0.xyzw, -|r0.xyzw|, l(1.000000, 1.000000, 1.000000, 1.000000)
sqrt r0.xyzw, r0.xyzw
add r0.xyzw, -r0.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
iadd r1.xyzw, r1.xyzw, r3.xyzw
itof r1.xyzw, r1.xyzw
mul r0.xyzw, r0.xyzw, r1.xyzw
ld_indexable(buffer)(float,float,float,float) r1.x, l(0, 0, 0, 0), t125.xyzw
mad r2.x, -r1.x, l(0.500000), r2.y
sample_indexable(texture2d)(float,float,float,float) r1.x, v0.xyxx, t0.xyzw, s2
mad r1.x, cb1[7].z, r1.x, cb1[7].w
div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
add r1.x, r1.x, -cb0[8].x
add r1.y, -cb0[8].x, cb0[8].y
div r2.w, r1.x, r1.y
sample_l_indexable(texture3d)(float,float,float,float) r1.xyzw, r2.xzwx, t2.xyzw, s0, l(0.000000)
mad r0.xyzw, r0.xyzw, l(0.00392156886, 0.00392156886, 0.00392156886, 0.00392156886), r1.wxyz
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v0.xyxx, t1.xyzw, s1
mad o0.xyz, r1.xyzx, r0.xxxx, r0.yzwy
mov o0.w, r1.w
ret
// Approximately 70 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v0.6.164 on Mon Jul 20 01:18:07 2026
//
// cbuffer cb1 : register(b1)
// {
//   float4 cb1[8] : packoffset(c0);
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[9] : packoffset(c0);
// }
//
// SamplerState s0_s_s : register(s0);
// SamplerState s1_s_s : register(s1);
// SamplerState s2_s_s : register(s2);
// Texture2D<float4> t0 : register(t0);
// Texture2D<float4> t1 : register(t1);
// Texture3D<float4> t2 : register(t2);
// Texture2DArray<float4> t3 : register(t3);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float2 v0 : TEXCOORD0,
//   float4 v1 : SV_POSITION0,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0,r1,r2,r3;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.xy = cb1[6].xy * v0.xy;
//   t3.GetDimensions(0, uiDest.x, uiDest.y, uiDest.z, uiDest.w);
//   r1.xyz = uiDest.xyz;
//   r0.zw = (uint2)r1.xy;
//   r1.xy = r0.xy * r0.zw;
//   r1.xy = cmp(r1.xy >= -r1.xy);
//   r1.xy = r1.xy ? r0.zw : -r0.zw;
//   r2.xy = float2(1,1) / r1.xy;
//   r0.xy = r2.xy * r0.xy;
//   r0.xy = frac(r0.xy);
//   r0.xy = r1.xy * r0.xy;
//   r0.xy = (uint2)r0.xy;
//   r0.xy = (uint2)r0.xy;
//   r2.xy = (int2)r0.xy;
//   r0.xy = asint(cb0[7].ww) + int2(3,4);
//   r0.xy = (int2)r0.xy;
//   r0.xy = (uint2)r0.xy;
//   r0.xy = (uint2)r0.xy % (uint2)r1.zz;
//   r0.xy = (uint2)r0.xy;
//   r2.z = (int)r0.x;
//   r1.z = (int)r0.y;
//   r2.w = 0;
//   r0.xy = t3.Load(r2.xyzw).xy;
//   r0.xy = r0.xy * float2(2,2) + float2(-1,-1);
//   r2.xy = cmp(float2(0,0) < r0.xy);
//   r2.xy = r2.xy ? float2(0,0) : 0;
//   r2.zw = cmp(r0.xy < float2(0,0));
//   r0.xy = float2(1,1) + -abs(r0.xy);
//   r0.xy = sqrt(r0.xy);
//   r0.xy = float2(1,1) + -r0.xy;
//   r2.xy = (int2)r2.zw + (int2)r2.xy;
//   r2.xy = (int2)r2.xy;
//   r0.xy = r2.xy * r0.xy;
//   r2.yz = r0.xy * float2(0.00392156886,0.00392156886) + v0.xy;
//   r0.xy = cb1[6].xy * r2.yz;
//   r3.xy = r0.xy * r0.zw;
//   r3.xy = cmp(r3.xy >= -r3.xy);
//   r0.zw = r3.xy ? r0.zw : -r0.zw;
//   r3.xy = float2(1,1) / r0.zw;
//   r0.xy = r3.xy * r0.xy;
//   r0.xy = frac(r0.xy);
//   r0.xy = r0.zw * r0.xy;
//   r0.xy = (uint2)r0.xy;
//   r0.xy = (uint2)r0.xy;
//   r1.xy = (int2)r0.xy;
//   r1.w = 0;
//   r0.xyzw = t3.Load(r1.xyzw).xyzw;
//   r0.xyzw = r0.wxyz * float4(2,2,2,2) + float4(-1,-1,-1,-1);
//   r1.xyzw = cmp(float4(0,0,0,0) < r0.xyzw);
//   r1.xyzw = r1.xyzw ? float4(0,0,0,0) : 0;
//   r3.xyzw = cmp(r0.xyzw < float4(0,0,0,0));
//   r0.xyzw = float4(1,1,1,1) + -abs(r0.xyzw);
//   r0.xyzw = sqrt(r0.xyzw);
//   r0.xyzw = float4(1,1,1,1) + -r0.xyzw;
//   r1.xyzw = (int4)r1.xyzw + (int4)r3.xyzw;
//   r1.xyzw = (int4)r1.xyzw;
//   r0.xyzw = r1.xyzw * r0.xyzw;
//   r1.x = StereoParams.Load(float4(0,0,0,0)).x;
//   r2.x = -r1.x * 0.5 + r2.y;
//   r1.x = t0.Sample(s2_s_s, v0.xy).x;
//   r1.x = cb1[7].z * r1.x + cb1[7].w;
//   r1.x = 1 / r1.x;
//   r1.x = -cb0[8].x + r1.x;
//   r1.y = cb0[8].y + -cb0[8].x;
//   r2.w = r1.x / r1.y;
//   r1.xyzw = t2.SampleLevel(s0_s_s, r2.xzw, 0).xyzw;
//   r0.xyzw = r0.xyzw * float4(0.00392156886,0.00392156886,0.00392156886,0.00392156886) + r1.wxyz;
//   r1.xyzw = t1.Sample(s1_s_s, v0.xy).xyzw;
//   o0.xyz = r1.xyz * r0.xxx + r0.yzw;
//   o0.w = r1.w;
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
