refactor(default): glsl cleaning (2/2)

This commit is contained in:
2026-08-28 20:08:41 +02:00
parent 749206746d
commit 118fc0d67e
11 changed files with 328 additions and 601 deletions
+14 -79
View File
@@ -103,78 +103,13 @@ vec4 debug(vec2 vUV)
// logic
const int texts[10][5] = {
{
0x46,
0x50,
0x53,
0x00,
0x00
}, // FPS
{
0x54,
0x45,
0x4D,
0x50,
0x4F
}, // TEMPO
{
0x54,
0x49,
0x4D,
0x45,
0x00
}, // TIME
{
0x44,
0x45,
0x4D,
0x4F,
0x00
}, // DEMO
{
0x4C,
0x49,
0x56,
0x45,
0x00
}, // LIVE
{
0x52,
0x41,
0x4E,
0x44,
0x00
}, // RAND
{
0x53,
0x52,
0x43,
0x00,
0x00
}, // SRC
{
0x46,
0x58,
0x00,
0x00,
0x00
}, // FX
{
0x49,
0x4E,
0x00,
0x00,
0x00
}, // IN
{
0x4D,
0x46,
0x58,
0x00,
0x00
}, // MFX
};
const int textTEMPO[] = int[5](0x54, 0x45, 0x4D, 0x50, 0x4F);
const int textTIME[] = int[5](0x54, 0x49, 0x4D, 0x45, 0x00);
const int textRAND[] = int[5](0x52, 0x41, 0x4E, 0x44, 0x00);
const int textSRC[] = int[5](0x53, 0x52, 0x43, 0x00, 0x00);
const int textFX[] = int[5](0x46, 0x58, 0x00, 0x00, 0x00);
const int textIN[] = int[5](0x49, 0x4E, 0x00, 0x00, 0x00);
const int textMFX[] = int[5](0x4D, 0x46, 0x58, 0x00, 0x00);
vec2 uv2 = uv1;
@@ -241,14 +176,14 @@ vec4 debug(vec2 vUV)
// show src/fx
f += write_5(uv3 * .75, vec2(-11.6, -1.8), texts[6]);
f += write_5(uv3 * .75, vec2(-4.2, -1.8), texts[7]);
f += write_5(uv3 * .75, vec2(-11.6, -1.8), textSRC);
f += write_5(uv3 * .75, vec2(-4.2, -1.8), textFX);
f += char_at(uv3 * .5, vec2(-11.5, 3.5), 0x41);
f += char_at(uv3 * .5, vec2(-11.5, -6.), 0x42);
if (iDemo < 1 && (iInputFormat1 == YUYV_FOURCC || iInputFormat2 == YUYV_FOURCC)) {
f += write_5(uv3 * .75, vec2(-19.7, -1.8), texts[8]);
f += write_5(uv3 * .75, vec2(-19.7, -1.8), textIN);
}
f += write_5(uv3 * .75, vec2(10.9, 2.), texts[9]);
f += write_5(uv3 * .75, vec2(10.9, 2.), textMFX);
// show inputs / feedback
float line_a_a = rect(uv2, vec2(-7.5, 2.), vec2(1.5, .1));
@@ -294,7 +229,7 @@ vec4 debug(vec2 vUV)
float x = 0.;
x = -15.;
f += write_5(uv3, vec2(x - 4.5, 13.), texts[1]);
f += write_5(uv3, vec2(x - 4.5, 13.), textTEMPO);
f += write_int(uv3, vec2(x + 1.5, 13.), int(iTempo), 3);
v = fract(iBeats);
f += h_rect(uv3, vec2(x, 12.), vec2(4., .5), .2);
@@ -302,13 +237,13 @@ vec4 debug(vec2 vUV)
x = 15.;
if (iAutoRand > 0) {
f += write_5(uv3, vec2(x - 4.5, 13.), texts[5]);
f += write_5(uv3, vec2(x - 4.5, 13.), textRAND);
f += write_int(uv3, vec2(x - .5, 13.), int(iAutoRandCycle), 5);
v = fract(iBeats / iAutoRandCycle);
} else {
f += write_int(uv3, vec2(x - .5, 13.), int(iTime), 5);
v = fract(iTime);
f += write_5(uv3, vec2(x - 4.5, 13.), texts[2]);
f += write_5(uv3, vec2(x - 4.5, 13.), textTIME);
}
f += h_rect(uv3, vec2(x, 12.), vec2(4., .5), .2);
f += rect(uv3, vec2(x + 4. * v - 4., 12), vec2(4. * v, .4));