feat: update project with glsl-glyphs

This commit is contained in:
klemek committed 2026-11-08 18:50:59 +01:00
1 parent 93fca80829
commit 0d8e97323e
7 files changed
+46 -18

No files matched your search

+4 -3
View File
@@ -267,8 +267,9 @@ vec4 fx_9(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, v
float k1 = 100. * (1. - zoom) + 10.;
float inv_k = 1. / k1;
uv2 = floor(uv2 * k1) * inv_k;
int start_char = charset_ctrl.x > 0. ? charsets[int(charset.x * CHARSETS) * 2] : 0x01;
int char_span = int((charset_ctrl.x > 0. ? charsets[int(charset.x * CHARSETS) * 2 + 1] : 255));
int charset_index = int(charset.x * (CP437_SETS - 1));
int start_char = charset_ctrl.x > 0. ? cp437_sets[charset_index * 2] : 0x01;
int char_span = int((charset_ctrl.x > 0. ? cp437_sets[charset_index * 2 + 1] : 255));
char_span = int(char_span * max(1. - charset.y, 1. / (char_span * .75)));
ivec2 uv2i = ivec2(uv2 * k1);
int code = ((charset_ctrl.y < 1. || (uv2i.x % 2 ^ uv2i.y % 2) > 0) ? 1 : 0) * (start_char + int((rand(uv2i) + char_delta) * char_span) % char_span);
@@ -277,7 +278,7 @@ vec4 fx_9(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, v
+ reframe(previous, uv2 + vec2(1., 1.) * inv_k * .125).xyz * .2
+ reframe(previous, uv2 + vec2(0., 1.) * inv_k * .125).xyz * .2
+ reframe(previous, uv2 + vec2(.5, .5) * inv_k * .125).xyz * .2;
c = chr(mod(uv1 * k1, 1.), code) ? c : vec3(0.);
c = cp437(mod(uv1 * k1, 1.), code) ? c : vec3(0.);
return fx_master(c0, c, seed, m0);
}