mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 11:11:47 +02:00
Adjust the workaround for non-linear blending of transparent pixels in compositors to hopefully further reduce fringing around text with certain color issues
Fixes #6534
This commit is contained in:
@@ -82,6 +82,10 @@ Detailed list of changes
|
|||||||
|
|
||||||
- Wayland: Do not request idle inhibition for full screen windows (:iss:`6613`)
|
- 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]
|
0.29.2 [2023-07-27]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -160,8 +160,8 @@ float adjust_alpha_for_incorrect_blending_by_compositor(float text_fg_alpha, flo
|
|||||||
// background_opacity non-linear
|
// background_opacity non-linear
|
||||||
// See https://github.com/kovidgoyal/kitty/issues/6209 for discussion.
|
// See https://github.com/kovidgoyal/kitty/issues/6209 for discussion.
|
||||||
const float threshold = 0.000001;
|
const float threshold = 0.000001;
|
||||||
// linear2srgb(final_alpha) if text_fg_alpha >= threshold else final_alpha
|
// ans = text_fg_alpha * linear2srgb(final_alpha) + (1 - text_fg_alpha) * final_alpha
|
||||||
return mix(final_alpha, linear2srgb(final_alpha), step(threshold, text_fg_alpha));
|
return mix(final_alpha, linear2srgb(final_alpha), text_fg_alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user