add debug info

This commit is contained in:
2025-09-20 20:31:51 +02:00
parent 3d5a6fc6ac
commit 3b48880f58
5 changed files with 34 additions and 24 deletions
+4 -13
View File
@@ -1129,7 +1129,7 @@ subroutine(src_stage_sub) vec4 src_9(vec2 vUV, int seed)
{
// start
vec2 uv0 = vUV.st;
vec2 uv0 = vUV.st;
float ratio = iResolution.x / iResolution.y;
vec2 uv1 = (uv0 - .5) * vec2(ratio, 1);
@@ -1137,16 +1137,7 @@ subroutine(src_stage_sub) vec4 src_9(vec2 vUV, int seed)
// logic
const int text[5] = {0x66, 0x70, 0x73, 0x00, 0x00};
vec2 uv2 = uv1 * 20;
float v = 0;
v += write_int(uv2, vec2(0.5, 0.5), iFPS, 3);
v += write_5(uv2, vec2(4.0, 0.5), text);
return vec4(v);
return texture(tex0, vUV);
}
// TODO SRC 10
@@ -1285,7 +1276,7 @@ subroutine(src_stage_sub) vec4 src_16(vec2 vUV, int seed)
rect(uv2, vec2(0.55, 2), vec2(1.5, 0.1)) +
rect(uv2, vec2(2, 1.55), vec2(0.1, 0.55)) +
rect(uv2, vec2(7.5, 0), vec2(1.5, 0.1)) +
h_rect(uv2, vec2(-9, 5.1), vec2(1), 0.1);
h_rect(uv2, vec2(-9, -3.9), vec2(1), 0.1);
// show selected src/fx
f += char_at(uv2, vec2(-5.4, 1.45), hex_chars[selected_srca]);
@@ -1315,7 +1306,7 @@ subroutine(src_stage_sub) vec4 src_16(vec2 vUV, int seed)
f += (selected_srcb == 0 || selected_srcb % 5 != 0 && selected_srcb >= 8) ? rect(uv2, vec2(-6.5, -2), vec2(0.5, 0.1)) + rect(uv2, vec2(0, -4), vec2(7, 0.1)) + rect(uv2, vec2(-7, -3), vec2(0.1, 1.1)) + rect(uv2, vec2(7, -2), vec2(0.1, 2.1)) : 0;
// show page
f += char_at(uv2, vec2(-9.2, 4.3), hex_chars[page]);
f += char_at(uv2, vec2(-9.2, -4.3), hex_chars[page]);
// show fx values
f = mix(f, 1 - f, rect(uv2, vec2(-2, 1.1 + 0.9 * fxa_value), vec2(0.9, 0.9 * fxa_value)));
+13 -1
View File
@@ -9,7 +9,7 @@ float s(vec2 uv, float x0, float y0) {
step(-y0 - 1, -uv.y);
}
const int texts[8][5] = {
const int texts[11][5] = {
{0x49, 0x4E, 0x20, 0x41, 0x00}, // IN A
{0x49, 0x4E, 0x20, 0x42, 0x00}, // IN B
{0x53, 0x52, 0x43, 0x20, 0x41}, // SRC A
@@ -18,6 +18,9 @@ const int texts[8][5] = {
{0x46, 0x58, 0x20, 0x42, 0x00}, // FX B
{0x41, 0x2B, 0x42, 0x00, 0x00}, // A+B
{0x4D, 0x46, 0x58, 0x00, 0x00}, // MFX
{0x46, 0x50, 0x53, 0x00, 0x00}, // FPS
{0x54, 0x45, 0x4D, 0x50, 0x4F}, // TEMPO
{0x54, 0x49, 0x4D, 0x45, 0x00}, // TIME
};
void main() {
@@ -51,5 +54,14 @@ void main() {
t += write_5(uv3, vec2(-17,8), texts[6]);
t += write_5(uv3, vec2(19,8), texts[7]);
t += write_5(uv3, vec2(-23,8), texts[8]);
t += write_int(uv3, vec2(-27,8), iFPS, 3);
t += write_5(uv3, vec2(-23,6), texts[9]);
t += write_int(uv3, vec2(-27,6), int(iTempo), 3);
t += write_5(uv3, vec2(-23,4), texts[10]);
t += write_int(uv3, vec2(-29,4), int(iTime), 5);
fragColor = mix(c, 1 - c, t);
}