// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.164 on Sat Nov 15 07:21:11 2025
//
//
// Buffer Definitions:
//
// cbuffer cb1
// {
//
//   float4 cb1[3];                     // Offset:    0 Size:    48
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0[65];                    // Offset:    0 Size:  1040
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// s0_s                              sampler      NA          NA    0        1
// s1_s                              sampler      NA          NA    1        1
// t0                                texture  float4          2d    0        1
// t1                                texture  float4          2d    1        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     zw
// TEXCOORD                 0   xy          1     NONE   float   xy
// COLOR                    0   xyzw        2     NONE   float
// TEXCOORD                 3   xyz         3     NONE   float   xyz
// NORMAL                   0   xyzw        4     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 CB1[3], immediateIndexed
dcl_constantbuffer CB0[65], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_buffer (float,float,float,float) t125
dcl_input_ps_siv linear noperspective v0.zw, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v3.xyz
dcl_input_ps constant v4.xyzw
dcl_output o0.xyzw
dcl_temps 2
mul r0.xyz, v3.yyyy, cb0[62].xywx
mad r0.xyz, cb0[61].xywx, v3.xxxx, r0.xyzx
mad r0.xyz, cb0[63].xywx, v3.zzzz, r0.xyzx
add r0.xyz, r0.xyzx, cb0[64].xywx
mul r0.w, r0.y, cb0[12].x
mul r0.xyw, r0.xzxw, l(0.500000, 0.500000, 0.000000, 0.500000)
add r1.yz, r0.yyyy, r0.xxwx
ld_indexable(buffer)(float,float,float,float) r0.xy, l(0, 0, 0, 0), t125.xyzw
add r0.y, -r0.y, r0.z
mul r0.x, r0.y, r0.x
mad r1.x, r0.x, l(0.500000), r1.y
div r0.xy, r1.xzxx, r0.zzzz
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t1.xyzw, s1
mad r0.x, cb0[14].x, r0.x, cb0[14].y
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
mad r0.x, r0.x, cb0[12].z, -r0.z
mad_sat r0.y, r0.z, cb0[47].z, cb0[47].w
add r0.y, -r0.y, l(1.000000)
mul_sat r0.x, r0.x, cb1[2].z
add r1.xyz, v3.xyzx, -cb0[11].xyzx
dp3 r0.z, r1.xyzx, r1.xyzx
sqrt r0.z, r0.z
add r0.z, r0.z, -cb1[2].y
add r0.w, -cb1[2].y, cb1[2].x
div_sat r0.z, r0.z, r0.w
add r0.w, -v4.w, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v1.xyxx, t0.xyzw, s0
add_sat r0.w, -r0.w, r1.w
mul r0.z, r0.z, r0.w
ge r0.z, r0.z, cb1[1].z
and r0.z, r0.z, l(0x3f800000)
mul o0.w, r0.z, r0.x
mul r0.xzw, r1.xxyz, v4.xxyz
mad r1.xyz, -r1.xyzx, v4.xyzx, cb0[48].xyzx
mad r0.xyz, r0.yyyy, r1.xyzx, r0.xzwx
add r0.xyz, r0.xyzx, -cb0[48].xyzx
mul r0.w, v0.w, v0.z
div r0.w, r0.w, cb0[12].y
add r0.w, -r0.w, l(1.000000)
mul r0.w, r0.w, cb0[12].z
max r0.w, r0.w, l(0.000000)
mad_sat r0.w, r0.w, cb0[47].z, cb0[47].w
mad o0.xyz, r0.wwww, r0.xyzx, cb0[48].xyzx
ret
// Approximately 44 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v0.6.164 on Sat Nov 15 07:21:11 2025
//
// cbuffer cb1 : register(b1)
// {
//   float4 cb1[3] : packoffset(c0);
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[65] : packoffset(c0);
// }
//
// SamplerState s0_s_s : register(s0);
// SamplerState s1_s_s : register(s1);
// Texture2D<float4> t0 : register(t0);
// Texture2D<float4> t1 : register(t1);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_POSITION0,
//   float2 v1 : TEXCOORD0,
//   float4 v2 : COLOR0,
//   float3 v3 : TEXCOORD3,
//   nointerpolation float4 v4 : NORMAL0,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0,r1;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.xyz = cb0[62].xyw * v3.yyy;
//   r0.xyz = cb0[61].xyw * v3.xxx + r0.xyz;
//   r0.xyz = cb0[63].xyw * v3.zzz + r0.xyz;
//   r0.xyz = cb0[64].xyw + r0.xyz;
//   r0.w = cb0[12].x * r0.y;
//   r0.xyw = float3(0.5,0.5,0.5) * r0.xzw;
//   r1.yz = r0.xw + r0.yy;
//   r0.xy = StereoParams.Load(float4(0,0,0,0)).xy;
//   r0.y = r0.z + -r0.y;
//   r0.x = r0.x * r0.y;
//   r1.x = r0.x * 0.5 + r1.y;
//   r0.xy = r1.xz / r0.zz;
//   r0.x = t1.Sample(s1_s_s, r0.xy).x;
//   r0.x = cb0[14].x * r0.x + cb0[14].y;
//   r0.x = 1 / r0.x;
//   r0.x = r0.x * cb0[12].z + -r0.z;
//   r0.y = saturate(r0.z * cb0[47].z + cb0[47].w);
//   r0.y = 1 + -r0.y;
//   r0.x = saturate(cb1[2].z * r0.x);
//   r1.xyz = -cb0[11].xyz + v3.xyz;
//   r0.z = dot(r1.xyz, r1.xyz);
//   r0.z = sqrt(r0.z);
//   r0.z = -cb1[2].y + r0.z;
//   r0.w = cb1[2].x + -cb1[2].y;
//   r0.z = saturate(r0.z / r0.w);
//   r0.w = 1 + -v4.w;
//   r1.xyzw = t0.Sample(s0_s_s, v1.xy).xyzw;
//   r0.w = saturate(r1.w + -r0.w);
//   r0.z = r0.w * r0.z;
//   r0.z = cmp(r0.z >= cb1[1].z);
//   r0.z = r0.z ? 1.000000 : 0;
//   o0.w = r0.x * r0.z;
//   r0.xzw = v4.xyz * r1.xyz;
//   r1.xyz = -r1.xyz * v4.xyz + cb0[48].xyz;
//   r0.xyz = r0.yyy * r1.xyz + r0.xzw;
//   r0.xyz = -cb0[48].xyz + r0.xyz;
//   r0.w = v0.z * v0.w;
//   r0.w = r0.w / cb0[12].y;
//   r0.w = 1 + -r0.w;
//   r0.w = cb0[12].z * r0.w;
//   r0.w = max(0, r0.w);
//   r0.w = saturate(r0.w * cb0[47].z + cb0[47].w);
//   o0.xyz = r0.www * r0.xyz + cb0[48].xyz;
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
