diff --git a/kitty/cell_fragment.glsl b/kitty/cell_fragment.glsl index 7cda68b11..4e0283596 100644 --- a/kitty/cell_fragment.glsl +++ b/kitty/cell_fragment.glsl @@ -191,15 +191,7 @@ void main() { #endif #endif -#ifdef SPECIAL -#ifdef TRANSPARENT - final_color = vec4_premul(background, bg_alpha); -#else - final_color = vec4(background, bg_alpha); -#endif -#endif - -#ifdef BACKGROUND +#if defined(BACKGROUND) || defined(SPECIAL) #ifdef TRANSPARENT final_color = vec4_premul(background, bg_alpha); #else diff --git a/kitty/cell_vertex.glsl b/kitty/cell_vertex.glsl index ca9a84af6..a1ff34867 100644 --- a/kitty/cell_vertex.glsl +++ b/kitty/cell_vertex.glsl @@ -215,9 +215,11 @@ void main() { #if defined(BACKGROUND) background = bg; // draw_bg_bitfield has bit 0 set to draw default bg cells and bit 1 set to draw non-default bg cells +#ifndef SPECIAL uint draw_bg_mask = uint(2 * cell_has_non_default_bg + (1 - cell_has_non_default_bg)); draw_bg = step(1, float(draw_bg_bitfield & draw_bg_mask)); #endif +#endif #ifdef TRANSPARENT // Set bg_alpha to background_opacity on cells that have the default background color