// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.198 on Thu Nov 28 20:53:17 2024
//
//
// Buffer Definitions:
//
// cbuffer cb1
// {
//
//   float4 cb1[4];                     // Index:    0 1 2 3          Components:    16
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0[145];                   // Index:    0-144            Components:   580
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// s0_s                              sampler      NA          NA    0        1
// t0                                texture  float4          2d    0        1
// IniParams                         texture  float4          1d  120        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   xyzw        1     NONE   float   xy
// TEXCOORD                 5   xyzw        2     NONE   float      w
// PARTICLE_VELOCITY        0   xyzw        3     NONE   float      w
// SV_IsFrontFace           0   x           4    FFACE    uint
//
//
// 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[4], immediateIndexed
dcl_constantbuffer CB0[145], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture1d (float,float,float,float) t120
dcl_input_ps_siv linear noperspective v0.zw, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.w
dcl_input_ps linear v3.w
dcl_output o0.xyzw
dcl_temps 1
ld_indexable(texture1d)(float,float,float,float) r0.x, l(10, 0, 0, 0), t120.yxzw
eq r0.x, r0.x, l(1.000000)
lt r0.y, v0.w, l(320.000000)
and r0.x, r0.y, r0.x
discard_nz r0.x
mov r0.x, v0.z
mov r0.y, l(1.000000)
mul r0.xy, r0.xyxx, v0.wwww
mad r0.z, r0.x, cb0[71].z, -cb0[71].w
div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
mad r0.x, r0.x, cb0[71].x, cb0[71].y
add r0.x, r0.z, r0.x
lt r0.z, cb0[35].w, l(1.000000)
movc r0.x, r0.z, r0.y, r0.x
add r0.x, r0.x, -cb1[2].y
mad r0.x, -r0.x, cb1[2].w, l(1.000000)
max r0.x, r0.x, l(0.000000)
min r0.x, r0.x, cb1[3].x
add r0.yz, -r0.xxxx, v1.xxyx
mad r0.x, r0.x, l(-2.000000), l(1.000000)
div r0.xy, r0.yzyy, r0.xxxx
add r0.zw, r0.xxxy, l(0.000000, 0.000000, -0.500000, -0.500000)
sample_b_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t0.xyzw, s0, cb0[144].x
mad r0.yz, |r0.zzwz|, l(0.000000, -2.000000, -2.000000, 0.000000), l(0.000000, 1.000000, 1.000000, 0.000000)
mul_sat r0.yz, r0.yyzy, l(0.000000, 100000.000000, 100000.000000, 0.000000)
mul r0.y, r0.z, r0.y
mul r0.x, r0.y, r0.x
mul r0.x, r0.x, v2.w
add r0.y, v3.w, -cb1[3].y
lt r0.y, l(0.000010), |r0.y|
ge r0.z, v3.w, cb1[3].y
and r0.z, r0.z, l(0x3f800000)
movc r0.y, r0.y, r0.z, l(1.000000)
mad r0.x, r0.x, r0.y, l(-0.333300)
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mov o0.xyzw, l(0,0,0,0)
ret
// Approximately 38 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with geo-11 v0.6.198 on Thu Nov 28 20:53:17 2024
//
// cbuffer cb1 : register(b1)
// {
//   float4 cb1[4] : packoffset(c0);
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[145] : packoffset(c0);
// }
//
// SamplerState s0_s_s : register(s0);
// Texture2D<float4> t0 : register(t0);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_Position0,
//   float4 v1 : TEXCOORD0,
//   float4 v2 : TEXCOORD5,
//   float4 v3 : PARTICLE_VELOCITY0,
//   uint v4 : SV_IsFrontFace0,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.x = IniParams.Load(float4(10,0,0,0)).y;
//   r0.x = cmp(r0.x == 1.000000);
//   r0.y = cmp(v0.w < 320);
//   r0.x = r0.y ? r0.x : 0;
//   if (r0.x != 0) discard;
//   r0.x = v0.z;
//   r0.y = 1;
//   r0.xy = v0.ww * r0.xy;
//   r0.z = r0.x * cb0[71].z + -cb0[71].w;
//   r0.z = 1 / r0.z;
//   r0.x = r0.x * cb0[71].x + cb0[71].y;
//   r0.x = r0.x + r0.z;
//   r0.z = cmp(cb0[35].w < 1);
//   r0.x = r0.z ? r0.y : r0.x;
//   r0.x = -cb1[2].y + r0.x;
//   r0.x = -r0.x * cb1[2].w + 1;
//   r0.x = max(0, r0.x);
//   r0.x = min(cb1[3].x, r0.x);
//   r0.yz = v1.xy + -r0.xx;
//   r0.x = r0.x * -2 + 1;
//   r0.xy = r0.yz / r0.xx;
//   r0.zw = float2(-0.5,-0.5) + r0.xy;
//   r0.x = t0.SampleBias(s0_s_s, r0.xy, cb0[144].x).x;
//   r0.yz = abs(r0.zw) * float2(-2,-2) + float2(1,1);
//   r0.yz = saturate(float2(100000,100000) * r0.yz);
//   r0.y = r0.y * r0.z;
//   r0.x = r0.x * r0.y;
//   r0.x = v2.w * r0.x;
//   r0.y = -cb1[3].y + v3.w;
//   r0.y = cmp(9.99999975e-06 < abs(r0.y));
//   r0.z = cmp(v3.w >= cb1[3].y);
//   r0.z = r0.z ? 1.000000 : 0;
//   r0.y = r0.y ? r0.z : 1;
//   r0.x = r0.x * r0.y + -0.333299994;
//   r0.x = cmp(r0.x < 0);
//   if (r0.x != 0) discard;
//   o0.xyzw = float4(0,0,0,0);
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
