fix: default project fx cp437

This commit is contained in:
2026-11-08 18:48:12 +01:00
parent b813c19057
commit a6240ecba8
+3 -2
View File
@@ -271,8 +271,9 @@ subroutine(fx_stage_sub) vec4 fx_9(vec2 vUV, sampler2D previous, sampler2D feedb
float k1 = 100. * (1. - zoom) + 10.;
float inv_k = 1. / k1;
uv2 = floor(uv2 * k1) * inv_k;
int start_char = charset_ctrl.x > 0. ? cp437_sets[int(charset.x * CP437_SETS) * 2] : 0x01;
int char_span = int((charset_ctrl.x > 0. ? cp437_sets[int(charset.x * CP437_SETS) * 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);