LIJI32 / SameBoy

Game Boy and Game Boy Color emulator written in C
https://sameboy.github.io/
Other
1.58k stars 206 forks source link

LCD Scaling filters don't seem to render correctly on high resolution displays #595

Closed o0lemonlime0o closed 3 months ago

o0lemonlime0o commented 3 months ago

I use the standalone version of SameBoy (not the RA core) on both my laptop, which has a 1080p screen, and my desktop, which has a 2160p screen. In 1080p, the filters display properly, but in 4k, they suffer from graphical glitches that look like this: (shown below are LCD and Monochrome LCD, respectively. Make sure to open the full size images in a new tab as the problem is not as obvious in the thread thumbnails)

sameboy1 sameboy2

On LCD, it's looks like there's a big "grid" over the image (not the pixel grid), especially visible on the characters and text here. On Monochrome LCD it's subtler but if you look closely you can see that the lines making up the pixel grid are doubled up in various places.

I used Dragon Warrior as my example but the issue is present in every game I tried.

LIJI32 commented 3 months ago

It happens on certain shaders when the scaling factor is a multiple of 3. It won't happen on 1080p (A factor of 7.5) or 5K (A factor of 20), but will happen on 4K (A factor of 15). This has been a known issue for a while and I haven't figured out the exact cause of it, other than it being a rounding error, until now. Expect a fix soon.