Skip to content

Commit

Permalink
GBA Video: Fix sprites with mid-frame palette changes in GL (fixes #2476
Browse files Browse the repository at this point in the history
)
  • Loading branch information
endrift committed May 30, 2022
1 parent 511a12c commit 0c02f27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Emulation fixes:
- GBA Video: Ignore horizontally off-screen sprite timing (fixes mgba.io/i/2391)
- GBA Video: Fix Hblank timing (fixes mgba.io/i/2131, mgba.io/i/2310)
- GBA Video: Fix rare crash in modes 3-5
- GBA Video: Fix sprites with mid-frame palette changes in GL (fixes mgba.io/i/2476)
Other fixes:
- Core: Don't attempt to restore rewind diffs past start of rewind
- Core: Fix the runloop resuming after a game has crashed (fixes mgba.io/i/2451)
Expand Down
2 changes: 1 addition & 1 deletion src/gba/renderers/gl.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ static const char* const _renderObj =
" discard;\n"
" }\n"
" int paletteEntry = renderTile((coord.x >> 3) + (coord.y >> 3) * stride, localPalette, coord & 7);\n"
" color = texelFetch(palette, ivec2(paletteEntry + 256, coord.y), 0);\n"
" color = texelFetch(palette, ivec2(paletteEntry + 256, int(texCoord.y) + mosaic.w), 0);\n"
" flags = inflags;\n"
" gl_FragDepth = float(flags.x) / 16.;\n"
" window = ivec4(objwin, 0);\n"
Expand Down

0 comments on commit 0c02f27

Please sign in to comment.