From e5806a6ac332baf6814b0ba177aaa9bf174a2fc4 Mon Sep 17 00:00:00 2001 From: Roland Fredenhagen Date: Mon, 31 May 2021 23:56:13 +0200 Subject: [PATCH] Better antialiasing for Undercurl --- wezterm-gui/src/line-frag.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wezterm-gui/src/line-frag.glsl b/wezterm-gui/src/line-frag.glsl index 730969706..35cb53899 100644 --- a/wezterm-gui/src/line-frag.glsl +++ b/wezterm-gui/src/line-frag.glsl @@ -23,9 +23,9 @@ void main() { vec4 under_color = sample_texture(atlas_nearest_sampler, o_underline); if (under_color.a != 0.0) { // if the underline glyph isn't transparent in this position then - // we take the underline color, otherwise we'll leave the color + // we overlay the underline color, otherwise we'll leave the color // at the background color. - color = under_color * o_underline_color; + color = color * (1.0 - under_color) + under_color * o_underline_color; } // Similar to the above: if the cursor texture isn't transparent