From 3bec16a4b93ef4085b3b9cc2121d378dc1ef41cd Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 17 Feb 2019 17:30:16 -0800 Subject: [PATCH] tweak text shader @Lompik reports that there are artifacts with certain color combos and proposes simplifying the color blending by just copying the rgb channel. This does look better than what we're currently doing so I see no reason not to adopt this for now, and we can revisit it later. Refs: https://github.com/wez/wezterm/issues/17 --- src/opengl/render.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/opengl/render.rs b/src/opengl/render.rs index d0022f9a5..c52ca7322 100644 --- a/src/opengl/render.rs +++ b/src/opengl/render.rs @@ -303,7 +303,8 @@ void main() { color = texture(glyph_tex, tex_coords); if (o_has_color == 0.0) { // if it's not a color emoji, tint with the fg_color - color = multiply(o_fg_color, color); + //color = multiply(o_fg_color, color); + color.rgb = o_fg_color.rgb; } } } @@ -363,7 +364,8 @@ void main() { color = texture(glyph_tex, tex_coords); if (o_has_color == 0.0) { // if it's not a color emoji, tint with the fg_color - color = multiply(o_fg_color, color); + //color = multiply(o_fg_color, color); + color.rgb = o_fg_color.rgb; } } }