Make bg_alpha always available

This commit is contained in:
Kovid Goyal
2023-06-24 08:47:13 +05:30
parent 4ac5b8f82f
commit 41a0e60064
3 changed files with 1 additions and 8 deletions

View File

@@ -29,7 +29,3 @@
#if (HAS_TRANSPARENCY == 1)
#define TRANSPARENT
#endif
#if defined(TRANSPARENT) || (PHASE == PHASE_SPECIAL)
#define NEEDS_BG_ALPHA
#endif

View File

@@ -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;

View File

@@ -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