fix: cp437 usage after glsl-glyphs
This commit is contained in:
@@ -206,7 +206,6 @@ glsl-glyphs: ## glsl-glyphs
|
||||
--name cp437 \
|
||||
--functions \
|
||||
--includes \
|
||||
--add-all \
|
||||
--input sample/cp437_8x8.png \
|
||||
--glyph-names sample/cp437_names.txt \
|
||||
--sets sample/cp437_sets.csv \
|
||||
|
||||
@@ -262,10 +262,9 @@ const int cp437_glyphs[] = int[1024](
|
||||
0x22E0, 0x4470, 0x0E22, 0x0744 // 0xFF, NBSP
|
||||
);
|
||||
|
||||
#define CP437_SETS 10
|
||||
#define CP437_SETS 9
|
||||
|
||||
const int cp437_sets[] = int[20](
|
||||
0x00, 256, // ALL
|
||||
const int cp437_sets[] = int[18](
|
||||
0x30, 10, // NUMBERS
|
||||
0x41, 26, // UPPERCASE LETTERS
|
||||
0x61, 26, // LOWERCASE LETTERS
|
||||
|
||||
@@ -196,8 +196,9 @@ subroutine(src_stage_sub) vec4 src_7(vec2 vUV, int seed, vec3 b1, vec2 f1, vec3
|
||||
uv2 *= zoom * 20. + 3.;
|
||||
uv2 += iBeats;
|
||||
uv2 = mod(uv2, 100.) + 100.;
|
||||
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);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user