Skip to content

Commit

Permalink
GBA Video: Fix #2489 in OpenGL renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed Dec 19, 2022
1 parent d294938 commit 90893df
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/gba/renderers/gl.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,10 +664,12 @@ static const char* const _finalize =
" if (((topFlags.y & 13) == 5 || topFlags.w > 0) && (bottomFlags.y & 2) == 2) {\n"
" topPixel.rgb *= float(topFlags.z) / 16.;\n"
" topPixel.rgb += bottomPixel.rgb * float(windowFlags.y) / 16.;\n"
" } else if ((topFlags.y & 13) == 9) {\n"
" topPixel.rgb += (1. - topPixel.rgb) * float(windowFlags.z) / 16.;\n"
" } else if ((topFlags.y & 13) == 13) {\n"
" topPixel.rgb -= topPixel.rgb * float(windowFlags.z) / 16.;\n"
" } else if (topFlags.w == 0) { \n"
" if ((topFlags.y & 13) == 9) {\n"
" topPixel.rgb += (1. - topPixel.rgb) * float(windowFlags.z) / 16.;\n"
" } else if ((topFlags.y & 13) == 13) {\n"
" topPixel.rgb -= topPixel.rgb * float(windowFlags.z) / 16.;\n"
" }\n"
" }\n"
" color = topPixel;\n"
"}";
Expand Down

0 comments on commit 90893df

Please sign in to comment.