// 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[7];                     // Offset:    0 Size:   112
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0[15];                    // Offset:    0 Size:   240
//
// }
//
//
// 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
// -------------------- ----- ------ -------- -------- ------- ------
// COLOR                    0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xy
// TEXCOORD                 1   xyzw        2     NONE   float      w
// TEXCOORD                 2   xyzw        3     NONE   float
// TEXCOORD                 3   xyzw        4     NONE   float
// TEXCOORD                 6   xyzw        5     NONE   float   xyzw
// TEXCOORD                 8   xyz         6     NONE   float
// SV_POSITION              0   xyzw        7      POS   float
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer CB1[7], immediateIndexed
dcl_constantbuffer CB0[15], 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 linear v0.xyzw
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.w
dcl_input_ps linear v5.xyzw
dcl_output o0.xyzw
dcl_temps 3
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul r1.xyzw, r0.xyzw, cb1[3].xyzw
mad r0.xyz, -r0.xyzx, cb1[3].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r0.xyz, r0.xyzx, r0.xyzx
add r2.xyz, -v0.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r0.xyz, -r0.xyzx, r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r2.xyz, r1.xyzx, r1.xyzx
ge r1.xyz, l(0.500000, 0.500000, 0.500000, 0.000000), r1.xyzx
and r1.xyz, r1.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
mad r2.xyz, r2.xyzx, v0.xyzx, -r0.xyzx
mad r0.xyz, r1.xyzx, r2.xyzx, r0.xyzx
mul r0.w, r1.w, v0.w
lt r1.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb1[0].xyxx
or r1.x, r1.x, r1.y
itof r1.x, r1.x
ne r1.x, r1.x, l(0.000000)
if_nz r1.x
  ld r1.xyzw, l(0, 0, 0, 0), t125.xyzw
  add r1.y, -r1.y, v5.w
  mul r1.x, r1.y, r1.x
  mad r1.x, r1.x, l(0.500000), v5.x
  mov r1.yz, v5.yyzy
  div r1.xyz, r1.xyzx, v5.wwww
  sample r2.xyzw, r1.xyxx, t1.xyzw, s1
  mad r1.x, cb0[14].z, r2.x, cb0[14].w
  div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
  mad r1.y, cb0[14].z, r1.z, cb0[14].w
  div r1.y, l(1.000000, 1.000000, 1.000000, 1.000000), r1.y
  add r1.x, r1.x, -cb1[0].x
  add r1.x, -r1.y, r1.x
  mul_sat r1.x, r1.x, cb1[0].y
else
  mov r1.x, l(1.000000)
endif
mov r1.y, l(1.000000)
mul r0.xyzw, r0.xyzw, r1.yyyx
div r1.x, v5.z, v5.w
mad r1.x, cb0[14].z, r1.x, cb0[14].w
div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
add r1.x, r1.x, -cb1[1].x
mul_sat r1.x, r1.x, cb1[1].y
mul r0.w, r0.w, r1.x
mul o0.xyz, r0.xyzx, v2.wwww
eq r0.x, cb1[6].w, l(1.000000)
movc o0.w, r0.x, r0.w, l(1.000000)
ret
// Approximately 46 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[7] : packoffset(c0);
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[15] : 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 : COLOR0,
//   float4 v1 : TEXCOORD0,
//   float4 v2 : TEXCOORD1,
//   float4 v3 : TEXCOORD2,
//   float4 v4 : TEXCOORD3,
//   float4 v5 : TEXCOORD6,
//   float3 v6 : TEXCOORD8,
//   float4 v7 : SV_POSITION0,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0,r1,r2;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.xyzw = t0.Sample(s0_s_s, v1.xy).xyzw;
//   r1.xyzw = cb1[3].xyzw * r0.xyzw;
//   r0.xyz = -r0.xyz * cb1[3].xyz + float3(1,1,1);
//   r0.xyz = r0.xyz + r0.xyz;
//   r2.xyz = float3(1,1,1) + -v0.xyz;
//   r0.xyz = -r0.xyz * r2.xyz + float3(1,1,1);
//   r2.xyz = r1.xyz + r1.xyz;
//   r1.xyz = cmp(float3(0.5,0.5,0.5) >= r1.xyz);
//   r1.xyz = r1.xyz ? float3(1,1,1) : 0;
//   r2.xyz = r2.xyz * v0.xyz + -r0.xyz;
//   r0.xyz = r1.xyz * r2.xyz + r0.xyz;
//   r0.w = v0.w * r1.w;
//   r1.xy = cmp(float2(0,0) < cb1[0].xy);
//   r1.x = (int)r1.x | (int)r1.y;
//   r1.x = (int)r1.x;
//   r1.x = cmp(r1.x != 0.000000);
//   if (r1.x != 0) {
//     r1.xyzw = StereoParams.Load(float4(0,0,0,0)).xyzw;
//     r1.y = v5.w + -r1.y;
//     r1.x = r1.x * r1.y;
//     r1.x = r1.x * 0.5 + v5.x;
//     r1.yz = v5.yz;
//     r1.xyz = r1.xyz / v5.www;
//     r2.xyzw = t1.Sample(s1_s_s, r1.xy).xyzw;
//     r1.x = cb0[14].z * r2.x + cb0[14].w;
//     r1.x = 1 / r1.x;
//     r1.y = cb0[14].z * r1.z + cb0[14].w;
//     r1.y = 1 / r1.y;
//     r1.x = -cb1[0].x + r1.x;
//     r1.x = r1.x + -r1.y;
//     r1.x = saturate(cb1[0].y * r1.x);
//   } else {
//     r1.x = 1;
//   }
//   r1.y = 1;
//   r0.xyzw = r1.yyyx * r0.xyzw;
//   r1.x = v5.z / v5.w;
//   r1.x = cb0[14].z * r1.x + cb0[14].w;
//   r1.x = 1 / r1.x;
//   r1.x = -cb1[1].x + r1.x;
//   r1.x = saturate(cb1[1].y * r1.x);
//   r0.w = r1.x * r0.w;
//   o0.xyz = v2.www * r0.xyz;
//   r0.x = cmp(cb1[6].w == 1.000000);
//   o0.w = r0.x ? r0.w : 1;
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
