// 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
// s2_s                              sampler      NA          NA    2        1
// t0                                texture  float4          2d    0        1
// t1                                texture  float4          2d    1        1
// t2                                texture  float4          2d    2        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
// CUSTOM_INSTANCE_ID       0   x           1     NONE    uint
// TEXCOORD                 0   xyzw        2     NONE   float   xyz
// TEXCOORD                 1   xyzw        3     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer CB1[3], immediateIndexed
dcl_constantbuffer CB0[65], 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_texture2d (float,float,float,float) t2
dcl_resource_buffer (float,float,float,float) t125
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xy
dcl_output o0.xyzw
dcl_temps 3
mul r0.xyz, v2.yyyy, cb0[62].xywx
mad r0.xyz, cb0[61].xywx, v2.xxxx, r0.xyzx
mad r0.xyz, cb0[63].xywx, v2.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 r2.xyzw, l(0, 0, 0, 0), t125.xyzw
add r0.x, r0.z, -r2.y
mul r0.x, r0.x, r2.x
mad r1.x, r0.x, l(0.500000), r1.y
div r0.xy, r1.xzxx, r0.zzzz
sample r0.xyzw, r0.xyxx, t0.xyzw, s0
mad r0.x, cb0[14].z, r0.x, cb0[14].w
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
mul r0.y, v2.y, cb0[54].z
mad r0.y, cb0[53].z, v2.x, r0.y
mad r0.y, cb0[55].z, v2.z, r0.y
add r0.y, r0.y, cb0[56].z
add r0.x, r0.y, r0.x
add_sat r0.x, r0.x, l(-0.100000)
add r0.x, -r0.x, l(1.000000)
mul r1.xyzw, cb0[10].xxxx, l(-0.010000, -0.010000, 0.010000, 0.010000)
mad r1.xyzw, v3.xyxy, l(2.500000, 2.500000, 5.000000, 5.000000), r1.xyzw
sample r2.xyzw, r1.xyxx, t1.xyzw, s1
sample r1.xyzw, r1.zwzz, t2.xyzw, s2
mul r0.yzw, r1.xxyz, r2.xxyz
mad r0.xyz, r0.xxxx, l(0.500000, 0.500000, 0.500000, 0.000000), r0.yzwy
ge r0.xyz, r0.xyzx, l(0.300000, 0.300000, 0.300000, 0.000000)
and r0.xyz, r0.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
add r1.xyz, -cb1[0].xyzx, cb1[1].xyzx
mad o0.xyz, r0.xyzx, r1.xyzx, cb1[0].xyzx
mov o0.w, cb1[2].y
ret
// Approximately 34 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);
// SamplerState s2_s_s : register(s2);
// Texture2D<float4> t0 : register(t0);
// Texture2D<float4> t1 : register(t1);
// Texture2D<float4> t2 : register(t2);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_POSITION0,
//   uint v1 : CUSTOM_INSTANCE_ID0,
//   float4 v2 : TEXCOORD0,
//   float4 v3 : TEXCOORD1,
//   out float4 o0 : SV_TARGET0)
// {
//   float4 r0,r1,r2;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.xyz = cb0[62].xyw * v2.yyy;
//   r0.xyz = cb0[61].xyw * v2.xxx + r0.xyz;
//   r0.xyz = cb0[63].xyw * v2.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;
//   r2.xyzw = StereoParams.Load(float4(0,0,0,0)).xyzw;
//   r0.x = -r2.y + r0.z;
//   r0.x = r2.x * r0.x;
//   r1.x = r0.x * 0.5 + r1.y;
//   r0.xy = r1.xz / r0.zz;
//   r0.xyzw = t0.Sample(s0_s_s, r0.xy).xyzw;
//   r0.x = cb0[14].z * r0.x + cb0[14].w;
//   r0.x = 1 / r0.x;
//   r0.y = cb0[54].z * v2.y;
//   r0.y = cb0[53].z * v2.x + r0.y;
//   r0.y = cb0[55].z * v2.z + r0.y;
//   r0.y = cb0[56].z + r0.y;
//   r0.x = r0.x + r0.y;
//   r0.x = saturate(-0.100000001 + r0.x);
//   r0.x = 1 + -r0.x;
//   r1.xyzw = float4(-0.00999999978,-0.00999999978,0.00999999978,0.00999999978) * cb0[10].xxxx;
//   r1.xyzw = v3.xyxy * float4(2.5,2.5,5,5) + r1.xyzw;
//   r2.xyzw = t1.Sample(s1_s_s, r1.xy).xyzw;
//   r1.xyzw = t2.Sample(s2_s_s, r1.zw).xyzw;
//   r0.yzw = r2.xyz * r1.xyz;
//   r0.xyz = r0.xxx * float3(0.5,0.5,0.5) + r0.yzw;
//   r0.xyz = cmp(r0.xyz >= float3(0.300000012,0.300000012,0.300000012));
//   r0.xyz = r0.xyz ? float3(1,1,1) : 0;
//   r1.xyz = cb1[1].xyz + -cb1[0].xyz;
//   o0.xyz = r0.xyz * r1.xyz + cb1[0].xyz;
//   o0.w = cb1[2].y;
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
