background color should always be set in vertex shader

This commit is contained in:
Kovid Goyal 2023-06-24 09:37:17 +05:30
parent 99012d2659
commit 5446aa9ccb
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -198,7 +198,6 @@ void main() {
draw_bg = 1;
#if (PHASE == PHASE_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
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));
@ -221,14 +220,12 @@ void main() {
#endif
#endif
#if (PHASE == PHASE_SPECIAL) || (PHASE == PHASE_BOTH)
// Selection and cursor
bg = choose_color(float(is_selected & ONE), choose_color(use_cell_for_selection_bg, color_to_vec(fg_as_uint), color_to_vec(highlight_bg)), bg);
background = choose_color(cell_data.has_block_cursor, color_to_vec(cursor_bg), bg);
#if !defined(TRANSPARENT) && (PHASE == PHASE_SPECIAL)
float is_special_cell = cell_data.has_block_cursor + float(is_selected & ONE);
bg_alpha = step(0.5, is_special_cell);
#endif
#endif
// }}}