mgba icon indicating copy to clipboard operation
mgba copied to clipboard

[OpenGL] Golden Sun: Some NPCs' position gets slightly displaced compared to Software mode

Open RafaelTrepaUnCarballo opened this issue 2 years ago • 1 comments

Some NPCs and sometimes even the main character are moved a bit to the left in OpenGL mode (in any resolution, even x1)

Software: Golden Sun (Spain) mGBA Software mode OpenGL: Golden Sun (Spain) mGBA OpenGL mode

Animated comparison: 174393171-1e7ad209-7283-4fcc-a378-3e1273650d2b

Present in the last build 0.10-7565-0dce8b392 , both for Windows x86_64 and Switch European Spanish Rom c63008d6

RafaelTrepaUnCarballo avatar Jun 17 '22 19:06 RafaelTrepaUnCarballo

This appears to be related to transformation rounding, especially when the 0,0 component of the transformation matrix is negative. I managed to redo the origin so it matches the software renderer when it's set to 1× scaling, but at anything else it introduces pixel gaps due to the origins of sprites no longer being the top left. It's gonna take some experimentation to fix.

endrift avatar Jul 05 '23 05:07 endrift