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
This commit is contained in:
Wez Furlong committed 2019-02-17 17:30:16 -08:00
1 parent 133ccc3d0a
commit 3bec16a4b9
1 file changed
+4 -2
+4 -2
View File
@@ -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;
}
}
}