diff --git a/docs/changelog.rst b/docs/changelog.rst index 80663a85a..1c101db58 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -82,6 +82,10 @@ Detailed list of changes - Wayland: Do not request idle inhibition for full screen windows (:iss:`6613`) +- Adjust the workaround for non-linear blending of transparent pixels in + compositors to hopefully further reduce fringing around text with certain + color issues (:iss:`6534`) + 0.29.2 [2023-07-27] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/cell_fragment.glsl b/kitty/cell_fragment.glsl index f96c83e5b..9b953f644 100644 --- a/kitty/cell_fragment.glsl +++ b/kitty/cell_fragment.glsl @@ -160,8 +160,8 @@ float adjust_alpha_for_incorrect_blending_by_compositor(float text_fg_alpha, flo // background_opacity non-linear // See https://github.com/kovidgoyal/kitty/issues/6209 for discussion. const float threshold = 0.000001; - // linear2srgb(final_alpha) if text_fg_alpha >= threshold else final_alpha - return mix(final_alpha, linear2srgb(final_alpha), step(threshold, text_fg_alpha)); + // ans = text_fg_alpha * linear2srgb(final_alpha) + (1 - text_fg_alpha) * final_alpha + return mix(final_alpha, linear2srgb(final_alpha), text_fg_alpha); } void main() {