mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-07-11 18:23:20 +00:00
Proper fix for always drawing borders opaque
This commit is contained in:
parent
b854589761
commit
cb13233606
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue