// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.164 on Fri Mar 27 01:57:56 2026
//
//
// Buffer Definitions:
//
// cbuffer cb3
// {
//
//   float4 cb3[21];                    // Offset:    0 Size:   336
//
// }
//
// cbuffer cb2
// {
//
//   float4 cb2[7];                     // Offset:    0 Size:   112
//
// }
//
// cbuffer cb1
// {
//
//   float4 cb1[7];                     // Offset:    0 Size:   112
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0[30];                    // Offset:    0 Size:   480
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// IniParams                         texture  float4          1d  120        1
// StereoParams                      texture  float4          2d  125        1
// cb0                               cbuffer      NA          NA    0        1
// cb1                               cbuffer      NA          NA    1        1
// cb2                               cbuffer      NA          NA    2        1
// cb3                               cbuffer      NA          NA    3        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float   xyz
// COLOR                    0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xyzw        3     NONE   float   xy
// TEXCOORD                 1   xy          4     NONE   float    y
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// COLOR                    1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xyzw        3     NONE   float   xyzw
// TEXCOORD                 1   xyzw        4     NONE   float   xyzw
// TEXCOORD                 2   xyzw        5     NONE   float   xyzw
// P                        0   x           6  RTINDEX    uint   x
//
vs_4_0
dcl_output_siv o6.x, rendertarget_array_index
dcl_constantbuffer CB3[21], immediateIndexed
dcl_constantbuffer CB2[7], immediateIndexed
dcl_constantbuffer CB1[7], immediateIndexed
dcl_constantbuffer CB0[30], immediateIndexed
dcl_resource_texture1d (float,float,float,float) t120
dcl_resource_buffer (float,float,float,float) t125
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xyzw
dcl_input v3.xy
dcl_input v4.y
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_temps 8
ld_indexable(buffer)(float,float,float,float) r7.xyzw, l(0, 0, 0, 0), t125.xyzw
mov o6.x, r7.z
ld r0.xyzw, l(89, 0, 0, 0), t120.xyzw
ne r0.xy, l(0.000000, 0.000000, 0.000000, 0.000000), r0.yxyy
or r0.x, r0.x, r0.y
add r0.yz, v0.xxyx, cb0[23].zzwz
mul r1.xyzw, r0.zzzz, cb2[1].xyzw
mad r1.xyzw, cb2[0].xyzw, r0.yyyy, r1.xyzw
mad r1.xyzw, cb2[2].xyzw, v0.zzzz, r1.xyzw
add r2.xyzw, r1.xyzw, cb2[3].xyzw
mad r1.xyz, cb2[3].xyzx, v0.wwww, r1.xyzx
add r1.xyz, -r1.xyzx, cb1[4].xyzx
mul r3.xyzw, r2.yyyy, cb3[18].xyzw
mad r3.xyzw, cb3[17].xyzw, r2.xxxx, r3.xyzw
mad r3.xyzw, cb3[19].xyzw, r2.zzzz, r3.xyzw
mad r2.xyzw, cb3[20].xyzw, r2.wwww, r3.xyzw
ld r3.xyzw, l(0, 0, 0, 0), t125.xyzw
mad r0.w, -r3.y, l(0.003300), l(1.000000)
mad r0.w, r3.x, r0.w, r2.x
mad r1.w, r3.x, l(-0.100000), r2.x
eq r3.x, r2.w, l(1.000000)
movc r0.w, r3.x, r0.w, r2.x
movc r5.x, r0.x, r1.w, r0.w
mov r5.yzw, r2.yyzw
mul r3.xyzw, v2.xyzw, cb0[3].xyzw
mul r3.xyz, r3.wwww, r3.xyzx
mov o1.xyzw, r3.xyzw
mul r4.w, v2.w, cb0[5].w
mul r4.xyz, r4.wwww, cb0[5].xyzx
add r4.xyzw, -r3.xyzw, r4.xyzw
dp3 r0.x, r1.xyzx, r1.xyzx
rsq r0.x, r0.x
mul r1.xyz, r0.xxxx, r1.xyzx
dp3 r2.x, v1.xyzx, cb2[4].xyzx
dp3 r2.y, v1.xyzx, cb2[5].xyzx
dp3 r2.z, v1.xyzx, cb2[6].xyzx
dp3 r0.x, r2.xyzx, r2.xyzx
rsq r0.x, r0.x
mul r2.xyz, r0.xxxx, r2.xyzx
dp3 r0.x, r2.xyzx, r1.xyzx
mul r1.xy, cb3[6].xyxx, cb1[6].yyyy
mad r1.xy, cb3[5].xyxx, cb1[6].xxxx, r1.xyxx
mul r1.xy, |r1.xyxx|, cb0[28].yzyy
div r1.xy, r2.wwww, r1.xyxx
dp2 r0.w, r1.xyxx, r1.xyxx
mad r1.xy, cb0[27].xyxx, l(0.250000, 0.250000, 0.000000, 0.000000), r1.xyxx
div o5.zw, l(0.000000, 0.000000, 0.250000, 0.250000), r1.xxxy
rsq r0.w, r0.w
mul r1.x, |v4.y|, cb0[28].x
add r1.y, cb0[29].x, l(1.000000)
mul r1.x, r1.y, r1.x
mul r1.y, r0.w, r1.x
add r1.z, -cb0[28].w, l(1.000000)
mul r1.z, r1.z, |r1.y|
mad r0.w, r1.x, r0.w, -r1.z
mad r0.x, |r0.x|, r0.w, r1.z
eq r0.w, cb3[8].w, l(0.000000)
movc r0.x, r0.w, r0.x, r1.y
mul r0.w, cb0[4].y, cb0[22].w
mad r0.w, r0.w, r0.x, l(1.000000)
div r0.x, r0.x, r0.w
mul r1.x, cb0[6].x, cb0[22].w
mul r1.x, r1.x, l(0.500000)
mul r1.y, r0.x, r1.x
add r1.y, r1.y, r1.y
min r1.y, r1.y, l(1.000000)
sqrt r1.y, r1.y
mad o2.xyzw, r1.yyyy, r4.xyzw, r3.xyzw
max r2.xyzw, cb0[26].xyzw, l(-20000000000.000000, -20000000000.000000, -20000000000.000000, -20000000000.000000)
min r2.xyzw, r2.xyzw, l(20000000000.000000, 20000000000.000000, 20000000000.000000, 20000000000.000000)
add r1.yz, r0.yyzy, -r2.xxyx
mad r0.yz, r0.yyzy, l(0.000000, 2.000000, 2.000000, 0.000000), -r2.xxyx
add o5.xy, -r2.zwzz, r0.yzyy
add r0.yz, -r2.xxyx, r2.zzwz
div o3.zw, r1.yyyz, r0.yyyz
mov o3.xy, v3.xyxx
ge r0.y, l(0.000000), v4.y
and r0.y, r0.y, l(0x3f800000)
add r0.z, -cb0[22].y, cb0[22].z
mad r0.y, r0.y, r0.z, cb0[22].y
mad r0.y, r0.y, l(0.250000), cb0[4].x
mul r0.y, r0.y, cb0[22].w
mad r0.y, r0.y, l(-0.500000), l(0.500000)
mad r0.w, r0.y, r0.x, l(-0.500000)
mad o4.y, -r1.x, r0.x, r0.w
mad o4.z, r1.x, r0.x, r0.w
mov o4.xw, r0.xxxw
add r6.x, -r7.y, r5.w
mul r6.y, r7.x, r7.w
mad r6.x, r6.x, r6.y, r5.x
ne r6.y, l(1.000000), r5.w
movc r5.x, r6.y, r6.x, r5.x
mov o0.xyzw, r5.xyzw
ret
// Approximately 86 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v0.6.164 on Fri Mar 27 01:57:56 2026
//
// cbuffer cb3 : register(b3)
// {
//   float4 cb3[21] : packoffset(c0);
// }
//
// cbuffer cb2 : register(b2)
// {
//   float4 cb2[7] : packoffset(c0);
// }
//
// cbuffer cb1 : register(b1)
// {
//   float4 cb1[7] : packoffset(c0);
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[30] : packoffset(c0);
// }
//
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : POSITION0,
//   float3 v1 : NORMAL0,
//   float4 v2 : COLOR0,
//   float4 v3 : TEXCOORD0,
//   float2 v4 : TEXCOORD1,
//   out float4 o0 : SV_POSITION0,
//   out float4 o1 : COLOR0,
//   out float4 o2 : COLOR1,
//   out float4 o3 : TEXCOORD0,
//   out float4 o4 : TEXCOORD1,
//   out float4 o5 : TEXCOORD2,
//   out uint o6 : P0)
// {
//   float4 r0,r1,r2,r3,r4,r5,r6,r7;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r7.xyzw = StereoParams.Load(float4(0,0,0,0)).xyzw;
//   o6.x = r7.z;
//   r0.xyzw = IniParams.Load(float4(89,0,0,0)).xyzw;
//   r0.xy = cmp(float2(0,0) != r0.yx);
//   r0.x = (int)r0.x | (int)r0.y;
//   r0.yz = cb0[23].zw + v0.xy;
//   r1.xyzw = cb2[1].xyzw * r0.zzzz;
//   r1.xyzw = cb2[0].xyzw * r0.yyyy + r1.xyzw;
//   r1.xyzw = cb2[2].xyzw * v0.zzzz + r1.xyzw;
//   r2.xyzw = cb2[3].xyzw + r1.xyzw;
//   r1.xyz = cb2[3].xyz * v0.www + r1.xyz;
//   r1.xyz = cb1[4].xyz + -r1.xyz;
//   r3.xyzw = cb3[18].xyzw * r2.yyyy;
//   r3.xyzw = cb3[17].xyzw * r2.xxxx + r3.xyzw;
//   r3.xyzw = cb3[19].xyzw * r2.zzzz + r3.xyzw;
//   r2.xyzw = cb3[20].xyzw * r2.wwww + r3.xyzw;
//   r3.xyzw = StereoParams.Load(float4(0,0,0,0)).xyzw;
//   r0.w = -r3.y * 0.00329999998 + 1;
//   r0.w = r3.x * r0.w + r2.x;
//   r1.w = r3.x * -0.100000001 + r2.x;
//   r3.x = cmp(r2.w == 1.000000);
//   r0.w = r3.x ? r0.w : r2.x;
//   r5.x = r0.x ? r1.w : r0.w;
//   r5.yzw = r2.yzw;
//   r3.xyzw = cb0[3].xyzw * v2.xyzw;
//   r3.xyz = r3.xyz * r3.www;
//   o1.xyzw = r3.xyzw;
//   r4.w = cb0[5].w * v2.w;
//   r4.xyz = cb0[5].xyz * r4.www;
//   r4.xyzw = r4.xyzw + -r3.xyzw;
//   r0.x = dot(r1.xyz, r1.xyz);
//   r0.x = rsqrt(r0.x);
//   r1.xyz = r1.xyz * r0.xxx;
//   r2.x = dot(v1.xyz, cb2[4].xyz);
//   r2.y = dot(v1.xyz, cb2[5].xyz);
//   r2.z = dot(v1.xyz, cb2[6].xyz);
//   r0.x = dot(r2.xyz, r2.xyz);
//   r0.x = rsqrt(r0.x);
//   r2.xyz = r2.xyz * r0.xxx;
//   r0.x = dot(r2.xyz, r1.xyz);
//   r1.xy = cb1[6].yy * cb3[6].xy;
//   r1.xy = cb3[5].xy * cb1[6].xx + r1.xy;
//   r1.xy = cb0[28].yz * abs(r1.xy);
//   r1.xy = r2.ww / r1.xy;
//   r0.w = dot(r1.xy, r1.xy);
//   r1.xy = cb0[27].xy * float2(0.25,0.25) + r1.xy;
//   o5.zw = float2(0.25,0.25) / r1.xy;
//   r0.w = rsqrt(r0.w);
//   r1.x = cb0[28].x * abs(v4.y);
//   r1.y = 1 + cb0[29].x;
//   r1.x = r1.x * r1.y;
//   r1.y = r1.x * r0.w;
//   r1.z = 1 + -cb0[28].w;
//   r1.z = abs(r1.y) * r1.z;
//   r0.w = r1.x * r0.w + -r1.z;
//   r0.x = abs(r0.x) * r0.w + r1.z;
//   r0.w = cmp(cb3[8].w == 0.000000);
//   r0.x = r0.w ? r0.x : r1.y;
//   r0.w = cb0[22].w * cb0[4].y;
//   r0.w = r0.w * r0.x + 1;
//   r0.x = r0.x / r0.w;
//   r1.x = cb0[22].w * cb0[6].x;
//   r1.x = 0.5 * r1.x;
//   r1.y = r1.x * r0.x;
//   r1.y = r1.y + r1.y;
//   r1.y = min(1, r1.y);
//   r1.y = sqrt(r1.y);
//   o2.xyzw = r1.yyyy * r4.xyzw + r3.xyzw;
//   r2.xyzw = max(float4(-2e+10,-2e+10,-2e+10,-2e+10), cb0[26].xyzw);
//   r2.xyzw = min(float4(2e+10,2e+10,2e+10,2e+10), r2.xyzw);
//   r1.yz = -r2.xy + r0.yz;
//   r0.yz = r0.yz * float2(2,2) + -r2.xy;
//   o5.xy = r0.yz + -r2.zw;
//   r0.yz = r2.zw + -r2.xy;
//   o3.zw = r1.yz / r0.yz;
//   o3.xy = v3.xy;
//   r0.y = cmp(0 >= v4.y);
//   r0.y = r0.y ? 1.000000 : 0;
//   r0.z = cb0[22].z + -cb0[22].y;
//   r0.y = r0.y * r0.z + cb0[22].y;
//   r0.y = r0.y * 0.25 + cb0[4].x;
//   r0.y = cb0[22].w * r0.y;
//   r0.y = r0.y * -0.5 + 0.5;
//   r0.w = r0.y * r0.x + -0.5;
//   o4.y = -r1.x * r0.x + r0.w;
//   o4.z = r1.x * r0.x + r0.w;
//   o4.xw = r0.xw;
//   r6.x = r5.w + -r7.y;
//   r6.y = r7.w * r7.x;
//   r6.x = r6.x * r6.y + r5.x;
//   r6.y = cmp(1.000000 != r5.w);
//   r5.x = r6.y ? r6.x : r5.x;
//   o0.xyzw = r5.xyzw;
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
