diff --git a/kitty/border_vertex.glsl b/kitty/border_vertex.glsl index 4a74b50b2..4d9647c03 100644 --- a/kitty/border_vertex.glsl +++ b/kitty/border_vertex.glsl @@ -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); }