Fix incorrect blending of foreground and background colors when negative z-index images are present

Also optimize the blending calculation a bit by using the mix() function
and just adding the text and strike alphas.
This commit is contained in:
Kovid Goyal
2017-11-21 14:19:49 +05:30
parent 3b4a242e26
commit 1fb81d2265
2 changed files with 20 additions and 12 deletions

View File

@@ -317,7 +317,7 @@ draw_cells_interleaved(ssize_t vao_idx, ssize_t gvao_idx, Screen *screen) {
glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, screen->lines * screen->columns);
bind_program(CELL_FOREGROUND_PROGRAM);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, screen->lines * screen->columns);
if (screen->grman->num_of_positive_refs) draw_graphics(vao_idx, gvao_idx, screen->grman->render_data, screen->grman->num_of_negative_refs, screen->grman->num_of_positive_refs);