mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-09 15:08:13 +02:00
Proper fix for always drawing borders opaque
This commit is contained in:
@@ -42,7 +42,11 @@ void main() {
|
||||
float is_window_bg = is_integer_value(rc, 3.);
|
||||
float is_default_bg = is_integer_value(rc, 0.);
|
||||
color3 = is_window_bg * window_bg + (1. - is_window_bg) * color3;
|
||||
// Border must be always drawn opaque
|
||||
float is_border_bg = 1. - step(0.5, abs((float(rc) - 2.) * (float(rc) - 1.))); // 1 if rc in (1, 2) else 0
|
||||
float final_opacity = is_default_bg * tint_opacity + (1. - is_default_bg) * background_opacity;
|
||||
final_opacity = is_border_bg + (1. - is_border_bg) * final_opacity;
|
||||
float final_premult_opacity = is_default_bg * tint_premult + (1. - is_default_bg) * background_opacity;
|
||||
final_premult_opacity = is_border_bg + (1. - is_border_bg) * final_premult_opacity;
|
||||
color = vec4(color3 * final_premult_opacity, final_opacity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user