Revert "DRYer"

It breaks rendering of background in draw_cells_interleaved()

This reverts commit 59dece4588.
This commit is contained in:
Kovid Goyal
2023-06-21 15:41:37 +05:30
parent 13a2affb9c
commit 2a96b5cb25
2 changed files with 9 additions and 3 deletions

View File

@@ -191,7 +191,15 @@ void main() {
#endif
#endif
#if defined(BACKGROUND) || defined(SPECIAL)
#ifdef SPECIAL
#ifdef TRANSPARENT
final_color = vec4_premul(background, bg_alpha);
#else
final_color = vec4(background, bg_alpha);
#endif
#endif
#ifdef BACKGROUND
#ifdef TRANSPARENT
final_color = vec4_premul(background, bg_alpha);
#else

View File

@@ -215,11 +215,9 @@ 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