melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
3.27k stars 542 forks source link

[Feature Request] Downsampling (filtering the higher resolutions to prevent aliasing) #848

Open Zerowalker opened 3 years ago

Zerowalker commented 3 years ago

As you can have higher resolutions with opengl, but the aliasing is still quite obvious i am thinking it has to do with how it's displayed. I know on Ishiiruka (Dolphin) you could use a shader to simply filter it when downsampling to the window resolution, instead of the basic nearest neighbour, and that helps a ton.

I might be mistaken though but i think it should help a lot and probably be fairly "simple" i hope.

Love the emulator, great job!

Arisotura commented 3 years ago

you can already do that, enable screen filtering while running the GL renderer at a higher resolution, it will downscale with a bilinear filter

Zerowalker commented 3 years ago

Oh, thought it tried it and it seemed like it just made everything soft, like when you use it for upscale. But i might have just used it wrong, gotta recheck that!

nadiaholmquist commented 3 years ago

It would be good to have an option to filter only the 3D when scaling it, because 2D elements look pretty bad with bilinear filtering.

Zerowalker commented 3 years ago

hmm, it's kinda odd that it looks bad, cause if it was scaled up as well, then downscaling with bilinear shouldn't do that much i think. Unless the billinear filtering is down afterwards, or perhaps before or something. Cause i think if you upscale with billienear and then downscale with billinear (to a higher resolution than it's original) it shouldn't look that much different from what it would look if it was just upscaled once to that resolution.

I might be wrong though, but it feels like something's off.

nadiaholmquist commented 3 years ago

Ah yeah that's kinda another feature request of mine - supporting doing an integer scale to the nearest scale and then bilinear the rest of the way to avoid the shimmering caused by non-integer scales, this would probably also give us what we want for the 3D scaling.