Update inc_cp437.glsl

This commit is contained in:
2026-08-28 19:22:13 +02:00
parent fb80096569
commit e1e88362bd
+3 -1
View File
@@ -302,7 +302,7 @@ bool char(vec2 pos, int code)
ivec2 subpos = pos2 % 4; ivec2 subpos = pos2 % 4;
int v = int(pow(2., subpos.y * 4. + subpos.x)); int v = int(pow(2., subpos.y * 4. + subpos.x));
int d = int(pos2.y * .25) * 2 + int(pos2.x * .25); int d = int(pos2.y * .25) * 2 + int(pos2.x * .25);
return (cp437[code * 4 + d] & v) > 0.; return (cp437[code * 4 + d] & v) > 0;
} }
float char_at(vec2 uv, vec2 pos, int code) float char_at(vec2 uv, vec2 pos, int code)
@@ -360,6 +360,7 @@ float write_20(vec2 uv, vec2 pos, int str[20])
float write_int(vec2 uv, vec2 pos, int value, int magnitude) float write_int(vec2 uv, vec2 pos, int value, int magnitude)
{ {
value = max(0, value);
int i; int i;
int m = 1; int m = 1;
float d = 0.; float d = 0.;
@@ -374,6 +375,7 @@ float write_int(vec2 uv, vec2 pos, int value, int magnitude)
float write_int_left(vec2 uv, vec2 pos, int value, int magnitude) float write_int_left(vec2 uv, vec2 pos, int value, int magnitude)
{ {
value = max(0, value);
int i; int i;
int m = 1; int m = 1;
float d = 0.; float d = 0.;