// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.7.11 on Thu Sep 17 18:35:22 2026
//
//
// Buffer Definitions:
//
// cbuffer TransformCB
// {
//
//   float4 mtx_palette[32];            // Offset:    0 Size:   512
//   float4 y_scale;                    // Offset:  512 Size:    16
//
// }
//
// cbuffer PerDrawCB
// {
//
//   struct
//   {
//
//       uint width;                    // Offset:    0
//       uint height;                   // Offset:    4
//       bool linear_filtering;         // Offset:    8
//
//   } textures[7];                     // Offset:    0 Size:   108 [unused]
//   float4 combiner_inputs[6];         // Offset:  112 Size:    96 [unused]
//   float4 fog_color;                  // Offset:  208 Size:    16 [unused]
//   float4 grayscale_color;            // Offset:  224 Size:    16 [unused]
//   float4 uv_transform[2];            // Offset:  240 Size:    32
//   float4 texture_clamp[2];           // Offset:  272 Size:    32 [unused]
//   float4 fog_params;                 // Offset:  304 Size:    16 [unused]
//   float4 palette_params[2];          // Offset:  320 Size:    32 [unused]
//   float4 lod_params;                 // Offset:  352 Size:    16 [unused]
//   float4 uCustom[16];                // Offset:  368 Size:   256 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// IniParams                         texture  float4          1d  120        1
// StereoParams                      texture  float4          2d  125        1
// PerDrawCB                         cbuffer      NA          NA    1        1
// TransformCB                       cbuffer      NA          NA    4        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// MTXSLOT                  0   x           1     NONE   float   x
// TEXCOORD                 0   xy          2     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
// P                        0   x           2  RTINDEX    uint   x
//
vs_4_0
dcl_output_siv o2.x, rendertarget_array_index
dcl_constantbuffer CB4[33], dynamicIndexed
dcl_constantbuffer CB1[16], immediateIndexed
dcl_resource_texture1d (float,float,float,float) t120
dcl_resource_buffer (float,float,float,float) t125
dcl_input v0.xyzw
dcl_input v1.x
dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_temps 6
ld_indexable(buffer)(float,float,float,float) r5.xyzw, l(0, 0, 0, 0), t125.xyzw
mov o2.x, r5.z
ld r0.xyzw, l(10, 0, 0, 0), t120.xyzw
add r0.y, v1.x, l(0.500000)
round_z r0.y, r0.y
ftou r0.y, r0.y
ishl r0.y, r0.y, l(2)
utof r0.z, r0.y
ftoi r0.z, r0.z
iadd r1.xyz, r0.zzzz, l(1, 2, 3, 0)
itof r1.xyz, r1.xyzx
ftou r1.xyz, r1.xyzx
mul r2.xyzw, v0.yyyy, cb4[r1.x + 0].xyzw
mad r2.xyzw, v0.xxxx, cb4[r0.y + 0].xyzw, r2.xyzw
mad r2.xyzw, v0.zzzz, cb4[r1.y + 0].xyzw, r2.xyzw
mad r1.xyzw, v0.wwww, cb4[r1.z + 0].xyzw, r2.xyzw
ld r2.xyzw, l(0, 0, 0, 0), t125.xyzw
mad r0.x, r2.x, r0.x, r1.x
add r0.y, r1.x, r2.x
eq r0.z, r1.w, l(1.000000)
ld r2.xyzw, l(3, 0, 0, 0), t120.xyzw
eq r2.yz, r2.xxwx, l(0.000000, 2.000000, 8.000000, 0.000000)
ne r2.xw, r2.wwwx, l(8.000000, 0.000000, 0.000000, 2.000000)
and r0.w, r2.z, r2.y
and r2.y, r0.z, r2.y
and r2.x, r2.x, r2.y
or r0.w, r2.w, r0.w
and r0.z, r0.w, r0.z
movc r0.x, r0.z, r0.x, r1.x
movc r3.x, r2.x, r0.y, r0.x
add r0.x, r1.w, r1.z
mul r3.z, r0.x, l(0.500000)
mul r3.y, r1.y, cb4[32].x
mov r3.w, r1.w
mad o1.xy, v2.xyxx, cb1[15].xzxx, cb1[15].ywyy
add r4.x, -r5.y, r3.w
mul r4.y, r5.x, r5.w
mad r4.x, r4.x, r4.y, r3.x
ne r4.y, l(1.000000), r3.w
movc r3.x, r4.y, r4.x, r3.x
mov o0.xyzw, r3.xyzw
ret
// Approximately 34 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with geo-11 v0.7.11 on Thu Sep 17 18:35:22 2026
//
// cbuffer TransformCB : register(b4)
// {
//   float4 mtx_palette[32] : packoffset(c0);
//   float4 y_scale : packoffset(c32);
// }
//
// cbuffer PerDrawCB : register(b1)
// {
//
//   struct
//   {
//     uint width;
//     uint height;
//     bool linear_filtering;
//   } textures[7] : packoffset(c0);
//
//   float4 combiner_inputs[6] : packoffset(c7);
//   float4 fog_color : packoffset(c13);
//   float4 grayscale_color : packoffset(c14);
//   float4 uv_transform[2] : packoffset(c15);
//   float4 texture_clamp[2] : packoffset(c17);
//   float4 fog_params : packoffset(c19);
//   float4 palette_params[2] : packoffset(c20);
//   float4 lod_params : packoffset(c22);
//   float4 uCustom[16] : packoffset(c23);
// }
//
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : POSITION0,
//   float v1 : MTXSLOT0,
//   float2 v2 : TEXCOORD0,
//   out float4 o0 : SV_POSITION0,
//   out float2 o1 : TEXCOORD0,
//   out uint o2 : P0)
// {
//   float4 r0,r1,r2,r3,r4,r5;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r5.xyzw = StereoParams.Load(float4(0,0,0,0)).xyzw;
//   o2.x = r5.z;
//   r0.xyzw = IniParams.Load(float4(10,0,0,0)).xyzw;
//   r0.y = 0.5 + v1.x;
//   r0.y = trunc(r0.y);
//   r0.y = (uint)r0.y;
//   r0.y = (uint)r0.y << 2;
//   r0.z = (uint)r0.y;
//   r0.z = (int)r0.z;
//   r1.xyz = (int3)r0.zzz + int3(1,2,3);
//   r1.xyz = (int3)r1.xyz;
//   r1.xyz = (uint3)r1.xyz;
//   r2.xyzw = mtx_palette[r1.x].xyzw * v0.yyyy;
//   r2.xyzw = v0.xxxx * mtx_palette[r0.y].xyzw + r2.xyzw;
//   r2.xyzw = v0.zzzz * mtx_palette[r1.y].xyzw + r2.xyzw;
//   r1.xyzw = v0.wwww * mtx_palette[r1.z].xyzw + r2.xyzw;
//   r2.xyzw = StereoParams.Load(float4(0,0,0,0)).xyzw;
//   r0.x = r2.x * r0.x + r1.x;
//   r0.y = r2.x + r1.x;
//   r0.z = cmp(r1.w == 1.000000);
//   r2.xyzw = IniParams.Load(float4(3,0,0,0)).xyzw;
//   r2.yz = cmp(r2.xw == float2(2,8));
//   r2.xw = cmp(r2.wx != float2(8,2));
//   r0.w = r2.z ? r2.y : 0;
//   r2.y = r0.z ? r2.y : 0;
//   r2.x = r2.x ? r2.y : 0;
//   r0.w = (int)r2.w | (int)r0.w;
//   r0.z = r0.z ? r0.w : 0;
//   r0.x = r0.z ? r0.x : r1.x;
//   r3.x = r2.x ? r0.y : r0.x;
//   r0.x = r1.z + r1.w;
//   r3.z = 0.5 * r0.x;
//   r3.y = y_scale.x * r1.y;
//   r3.w = r1.w;
//   o1.xy = v2.xy * uv_transform[0].xz + uv_transform[0].yw;
//   r4.x = r3.w + -r5.y;
//   r4.y = r5.w * r5.x;
//   r4.x = r4.x * r4.y + r3.x;
//   r4.y = cmp(1.000000 != r3.w);
//   r3.x = r4.y ? r4.x : r3.x;
//   o0.xyzw = r3.xyzw;
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
