From 4b5e793f48f6e721c39ab6ddcf755604df73b643 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 9 Aug 2026 20:31:09 -0300 Subject: Better text rendering --- shaders/ui.frag.glsl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'shaders') diff --git a/shaders/ui.frag.glsl b/shaders/ui.frag.glsl index d0967309..d00a0601 100644 --- a/shaders/ui.frag.glsl +++ b/shaders/ui.frag.glsl @@ -13,9 +13,8 @@ layout(location = 0) out vec4 o_col; void main() { float a = texture(u_atlas, v_uv).r; - // stb_truetype is unhinted. A small coverage lift counters its grey edge - // halo without turning the atlas into hard-edged bitmap text. - a = pow(a, 0.8); + // FreeType's hinted grayscale bitmap is already the intended coverage. + // Preserve it exactly; weight-changing gamma hacks blur small stems. vec3 col = mix(v_bg, v_fg, a); o_col = vec4(col, 1.0); } -- cgit v1.3