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