// textures SAMPLER_BINDING(8) uniform sampler2D samp8; SAMPLER_BINDING(9) uniform sampler2D samp9; const int char_width = 8; const int char_height = 13; const int char_count = 95; const int char_pixels = char_width*char_height; const vec2 char_dim = vec2(char_width, char_height); const vec2 font_scale = vec2(1.0/float(char_width)/float(char_count), 1.0/float(char_height)); out vec4 ocol0; in vec2 uv0; uniform vec4 resolution; void main() { vec2 char_pos = floor(uv0*resolution.xy/char_dim); vec2 pixel_offset = floor(uv0*resolution.xy) - char_pos*char_dim; // just a big number float mindiff = float(char_width*char_height) * 100.0; float minc = 0.0; vec4 mina = vec4(0.0, 0.0, 0.0, 0.0); vec4 minb = vec4(0.0, 0.0, 0.0, 0.0); for (int i=0; i