mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Make bg_alpha always available
This commit is contained in:
@@ -29,7 +29,3 @@
|
||||
#if (HAS_TRANSPARENCY == 1)
|
||||
#define TRANSPARENT
|
||||
#endif
|
||||
|
||||
#if defined(TRANSPARENT) || (PHASE == PHASE_SPECIAL)
|
||||
#define NEEDS_BG_ALPHA
|
||||
#endif
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
|
||||
in vec3 background;
|
||||
in float draw_bg;
|
||||
#ifdef NEEDS_BG_ALPHA
|
||||
in float bg_alpha;
|
||||
#endif
|
||||
|
||||
#ifdef NEEDS_FOREGROUND
|
||||
uniform sampler2DArray sprites;
|
||||
|
||||
@@ -36,9 +36,7 @@ const uvec2 cell_pos_map[] = uvec2[4](
|
||||
|
||||
out vec3 background;
|
||||
out float draw_bg;
|
||||
#ifdef NEEDS_BG_ALPHA
|
||||
out float bg_alpha;
|
||||
#endif
|
||||
|
||||
#ifdef NEEDS_FOREGROUND
|
||||
uniform float inactive_text_alpha;
|
||||
@@ -206,6 +204,7 @@ void main() {
|
||||
draw_bg = step(1, float(draw_bg_bitfield & draw_bg_mask));
|
||||
#endif
|
||||
|
||||
bg_alpha = 1.f;
|
||||
#ifdef TRANSPARENT
|
||||
// Set bg_alpha to background_opacity on cells that have the default background color
|
||||
// Which means they must not have a block cursor or a selection or reverse video
|
||||
|
||||
Reference in New Issue
Block a user