GBA Video: Fix mosaic in modes 1-5 in OpenGL (fixes #1620)
Vicki Pfau vi@endrift.com
Mon, 20 Jan 2020 18:09:26 -0800
2 files changed,
7 insertions(+),
6 deletions(-)
M
CHANGES
→
CHANGES
@@ -102,6 +102,7 @@ - 3DS: Fix screen darkening (fixes mgba.io/i/1562)
- Core: Fix uninitialized memory issues with graphics caches - Core: Return null for out of bounds cached tile VRAM querying - GBA Video: Fix OpenGL fragment data binding + - GBA Video: Fix mosaic in modes 1-5 in OpenGL (fixes mgba.io/i/1620) - Debugger: Fix tracing skipping instructions (fixes mgba.io/i/1614) - OpenGL: Only invalidate texture if dimensions change (fixes mgba.io/i/1612) - Qt: Fix fast forward mute being reset (fixes mgba.io/i/1574)
M
src/gba/renderers/gl.c
→
src/gba/renderers/gl.c
@@ -268,10 +268,10 @@ " ivec2 mat[4];\n"
" ivec2 offset[4];\n" " vec2 incoord = texCoord;\n" " if (mosaic.x > 1) {\n" - " incoord.x = float(int(incoord.x) % mosaic.x);\n" + " incoord.x = floor(incoord.x - float(int(incoord.x) % mosaic.x));\n" " }\n" " if (mosaic.y > 1) {\n" - " incoord.y = float(int(incoord.y) % mosaic.y);\n" + " incoord.y = floor(incoord.y - float(int(incoord.y) % mosaic.y));\n" " }\n" " loadAffine(int(incoord.y), mat, offset);\n" " float y = fract(incoord.y);\n"@@ -321,10 +321,10 @@ " ivec2 mat[4];\n"
" ivec2 offset[4];\n" " vec2 incoord = texCoord;\n" " if (mosaic.x > 1) {\n" - " incoord.x = float(int(incoord.x) % mosaic.x);\n" + " incoord.x = floor(incoord.x - float(int(incoord.x) % mosaic.x));\n" " }\n" " if (mosaic.y > 1) {\n" - " incoord.y = float(int(incoord.y) % mosaic.y);\n" + " incoord.y = floor(incoord.y - float(int(incoord.y) % mosaic.y));\n" " }\n" " loadAffine(int(incoord.y), mat, offset);\n" " float y = fract(incoord.y);\n"@@ -386,10 +386,10 @@ " ivec2 mat[4];\n"
" ivec2 offset[4];\n" " vec2 incoord = texCoord;\n" " if (mosaic.x > 1) {\n" - " incoord.x = float(int(incoord.x) % mosaic.x);\n" + " incoord.x = floor(incoord.x - float(int(incoord.x) % mosaic.x));\n" " }\n" " if (mosaic.y > 1) {\n" - " incoord.y = float(int(incoord.y) % mosaic.y);\n" + " incoord.y = floor(incoord.y - float(int(incoord.y) % mosaic.y));\n" " }\n" " loadAffine(int(incoord.y), mat, offset);\n" " float y = fract(incoord.y);\n"