refactor: debug improvements

This commit is contained in:
2025-11-17 12:13:49 +01:00
parent e1219c316c
commit 0fe3b067cb
4 changed files with 27 additions and 24 deletions
+21 -21
View File
@@ -52,12 +52,12 @@ void main() {
c += s(uv2,1,2) * texture(iTex5, uv2); c += s(uv2,1,2) * texture(iTex5, uv2);
c += s(uv2,2,2) * texture(iTex7, uv2); c += s(uv2,2,2) * texture(iTex7, uv2);
c += s(uv2,1,1) * texture(iTex6, uv2); c += s(uv2,1,0) * texture(iTex6, uv2);
c += s(uv2,2,1) * texture(iTex8, uv2); c += s(uv2,2,0) * texture(iTex8, uv2);
c += s(uv2,0,0) * debug(mod(uv2, 1)); c += s(uv2,0,1) * debug(mod(uv2, 1));
c += s(uv2,1,0) * texture(iTex9, uv2); c += s(uv2,1,1) * texture(iTex9, uv2);
c += s(uv2,2,0) * texture(iTex0, uv2); c += s(uv2,2,1) * texture(iTex0, uv2);
float f = 0; float f = 0;
float t = 0; float t = 0;
@@ -75,30 +75,30 @@ void main() {
t += write_5(uv3, vec2(-53,26), texts[9]); t += write_5(uv3, vec2(-53,26), texts[9]);
} }
f += rect(uv3, vec2(-51, 8.5), vec2(2.1, 0.7)); f += rect(uv3, vec2(-51, -11.5), vec2(2.1, 0.7));
t += write_5(uv3, vec2(-53,8), texts[1]); t += write_5(uv3, vec2(-53,-12), texts[1]);
if (iInputResolution2.x > 0) { if (iInputResolution2.x > 0) {
c += s(uv2,0,1) * texture(iTex4, uv2); c += s(uv2,0,2) * texture(iTex4, uv2);
f += rect(uv3, vec2(-50.4, 6.5), vec2(2.8, 0.7)); f += rect(uv3, vec2(-50.4, -13.5), vec2(2.8, 0.7));
t += write_int(uv3, vec2(-53,6), iInputFPS2, 2); t += write_int(uv3, vec2(-53,-14), iInputFPS2, 2);
t += write_5(uv3, vec2(-50.5,6), texts[8]); t += write_5(uv3, vec2(-50.5,-14), texts[8]);
} else { } else {
f += rect(uv3, vec2(-51.5, 6.5), vec2(1.6, 0.7)); f += rect(uv3, vec2(-51.5, -13.5), vec2(1.6, 0.7));
t += write_5(uv3, vec2(-53,6), texts[9]); t += write_5(uv3, vec2(-53,-14), texts[9]);
} }
f += rect(uv3, vec2(-14.5, 28.5), vec2(2.6, 0.7)); f += rect(uv3, vec2(-14.5, 28.5), vec2(2.6, 0.7));
t += write_5(uv3, vec2(-17,28), texts[2]); t += write_5(uv3, vec2(-17,28), texts[2]);
f += rect(uv3, vec2(-14.5, 8.5), vec2(2.6, 0.7)); f += rect(uv3, vec2(-14.5, -11.5), vec2(2.6, 0.7));
t += write_5(uv3, vec2(-17,8), texts[3]); t += write_5(uv3, vec2(-17,-12), texts[3]);
f += rect(uv3, vec2(21, 28.5), vec2(2.1, 0.7)); f += rect(uv3, vec2(21, 28.5), vec2(2.1, 0.7));
t += write_5(uv3, vec2(19,28), texts[4]); t += write_5(uv3, vec2(19,28), texts[4]);
f += rect(uv3, vec2(21, 8.5), vec2(2.1, 0.7)); f += rect(uv3, vec2(21, -11.5), vec2(2.1, 0.7));
t += write_5(uv3, vec2(19,8), texts[5]); t += write_5(uv3, vec2(19,-12), texts[5]);
f += rect(uv3, vec2(-15.5, -11.5), vec2(1.6, 0.7)); f += rect(uv3, vec2(-15.5, 8.5), vec2(1.6, 0.7));
t += write_5(uv3, vec2(-17,-12), texts[6]); t += write_5(uv3, vec2(-17,8), texts[6]);
f += rect(uv3, vec2(20.5, -11.5), vec2(1.6, 0.7)); f += rect(uv3, vec2(20.5, 8.5), vec2(1.6, 0.7));
t += write_5(uv3, vec2(19,-12), texts[7]); t += write_5(uv3, vec2(19,8), texts[7]);
fragColor = mix(c, vec4(f - t), f); fragColor = mix(c, vec4(f - t), f);
} }
+2 -1
View File
@@ -17,11 +17,12 @@ uniform int iSeed8;
uniform vec3 iMidi2_3[7]; uniform vec3 iMidi2_3[7];
uniform vec3 iMidi3_1[2]; uniform vec3 iMidi3_1[2];
uniform int iDemo; uniform int iDemo;
uniform int iAutoRand;
void main() { void main() {
vec4 color = fx_stage(vUV, iTex9, iTex0, iSeed8, iMidi2_3[0], iMidi2_3[1].xy, iMidi2_3[2], iMidi2_3[3].xy, iMidi2_3[4], iMidi2_3[5].xy, iMidi2_3[6]); vec4 color = fx_stage(vUV, iTex9, iTex0, iSeed8, iMidi2_3[0], iMidi2_3[1].xy, iMidi2_3[2], iMidi2_3[3].xy, iMidi2_3[4], iMidi2_3[5].xy, iMidi2_3[6]);
if (iDemo < 1) { if (iDemo < 1 && iAutoRand < 1) {
color = mix(color, vec4(0), iMidi3_1[0].y); color = mix(color, vec4(0), iMidi3_1[0].y);
} }
+1 -1
View File
@@ -228,7 +228,7 @@ vec4 debug(vec2 vUV)
x = -15; x = -15;
f += write_5(uv3, vec2(x - 4,13), texts[0]); f += write_5(uv3, vec2(x - 4,13), texts[0]);
f += write_int(uv3, vec2(x + 1, 13), iFPS, 3); f += write_int(uv3, vec2(x + 1, 13), iFPS, 3);
v = min(1, iFPS/60.0); v = min(1, iFPS/30.0);
f += h_rect(uv3, vec2(x, 12), vec2(4, 0.5), 0.2); f += h_rect(uv3, vec2(x, 12), vec2(4, 0.5), 0.2);
f += rect(uv3, vec2(x + 4 * v - 4, 12), vec2(4 * v, 0.4)); f += rect(uv3, vec2(x + 4 * v - 4, 12), vec2(4 * v, 0.4));
+2
View File
@@ -2,6 +2,8 @@
#define PI 3.1415927 #define PI 3.1415927
#endif #endif
#include inc_time.glsl
#include inc_rand.glsl
#include inc_res.glsl #include inc_res.glsl
#ifndef INC_FUNCTIONS #ifndef INC_FUNCTIONS