feat: generate cp437/sentences with glsl-glyphs

This commit is contained in:
2026-11-08 17:16:33 +01:00
parent fe2a9734f1
commit d604d60369
11 changed files with 460 additions and 391 deletions
+9 -9
View File
@@ -1,7 +1,7 @@
#include inc_magic.glsl
#include inc_functions.glsl
#include inc_yuyv.glsl
#include inc_cp437.glsl
#include inc_write.glsl
#ifndef INC_DEBUG
#define INC_DEBUG
@@ -146,17 +146,17 @@ vec4 debug(vec2 vUV)
}
// show selected src/fx
f += char_at(uv2, vec2(-5.4, 1.45), hex_chars[selected_srca]);
f += cp437_at(uv2, vec2(-5.4, 1.45), hex_chars[selected_srca]);
f += random_srca ? circle(uv2, vec2(-4.25, 2.7), .1) : 0.;
f += char_at(uv2, vec2(-5.4, -2.55), hex_chars[selected_srcb]);
f += cp437_at(uv2, vec2(-5.4, -2.55), hex_chars[selected_srcb]);
f += random_srcb ? circle(uv2, vec2(-4.25, -1.3), .1) : 0.;
f += char_at(uv2, vec2(-2.4, 1.45), hex_chars[selected_fxa]);
f += cp437_at(uv2, vec2(-2.4, 1.45), hex_chars[selected_fxa]);
f += fxa_invert ? rect(uv2, vec2(-2., 2.7), vec2(.5, .05)) : 0.;
f += random_fxa ? circle(uv2, vec2(-1.25, 2.7), .1) : 0.;
f += char_at(uv2, vec2(-2.4, -2.55), hex_chars[selected_fxb]);
f += cp437_at(uv2, vec2(-2.4, -2.55), hex_chars[selected_fxb]);
f += fxb_invert ? rect(uv2, vec2(-2., -1.3), vec2(.5, .05)) : 0.;
f += random_fxb ? circle(uv2, vec2(-1.25, -1.3), .1) : 0.;
f += char_at(uv2, vec2(4.6, -.55), hex_chars[selected_mfx]);
f += cp437_at(uv2, vec2(4.6, -.55), hex_chars[selected_mfx]);
f += mfx_invert ? rect(uv2, vec2(5., .7), vec2(.5, .05)) : 0.;
f += random_mfx ? circle(uv2, vec2(5.75, .7), .1) : 0.;
@@ -178,8 +178,8 @@ vec4 debug(vec2 vUV)
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);
f += cp437_at(uv3 * .5, vec2(-11.5, 3.5), 0x41);
f += cp437_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), textIN);
}
@@ -221,7 +221,7 @@ vec4 debug(vec2 vUV)
f = mix(f, 1 - f, rect(uv2, vec2(5., -.9 + .9 * mfx_value), vec2(.9, .9 * mfx_value)));
// show mix
f += char_at(uv2, vec2(1.55, -.6), mix_type ? 0x4B : 0x4D);
f += cp437_at(uv2, vec2(1.55, -.6), mix_type ? 0x4B : 0x4D);
f = mix(f, 1 - f, rect(uv2, vec2(2., -.9 + .9 * mix_value), vec2(.9, .9 * mix_value)));
// show debug info