xjsxjs197 / WiiSXRX_2022

GNU General Public License v3.0
149 stars 15 forks source link

[request] if possible, use XFB for horizontal scaling for better image quality #199

Open therealteamplayer opened 6 months ago

therealteamplayer commented 6 months ago

When playing at 480p with bilinear filtering off, I've noticed that games such as Symphony of the Night, which run at something like 256x240, are stretched horizontally to fill the Wii's internal 640x480 resolution, so that a 4:3 aspect ratio is maintained. However the stretching applied causes pixel widths to become uneven, which introduces noticeable shimmering when scrolling the screen.

I believe the way that emulators such as SNES9xRX (as the SNES runs at 256x240) handle this is to instead use VI width (the XFB can be scaled horizontally) to stretch the image horizontally when needed, which produces much better looking results (less shimmering while still having mostly crisp pixels). Could this be implemented possibly?

Failing that, perhaps there could be an option to not stretch the image (which would mean no shimmering but obviously the aspect ratio would be a bit off, so it'd be a trade-off).

saulfabregwiivc commented 6 months ago

Btw, have you tried latest WiiSX for see if this issue also happens there? http://github.com/emukidid/pcsxgc/actions

Sorry if i say you to test another PS1 emulator but its from there we also take fixes to WiiStation, as WiiSX is 100% synced with the upstream PCSX-ReARMed.

therealteamplayer commented 6 months ago

Btw, have you tried latest WiiSX for see if this issue also happens there? http://github.com/emukidid/pcsxgc/actions

Sorry if i say you to test another PS1 emulator but its from there we also take fixes to WiiStation, as WiiSX is 100% synced with the upstream PCSX-ReARMed.

I wouldn't be able to see unfortunately since as far as I can tell, that version doesn't let you turn off the bilinear filter, which would remove the shimmering (at the cost of making the image very blurry). The shimmering is a result of pixel widths being uneven due to how the image is being stretched, and I believe stretching using the XFB avoids this (or at least makes it much less severe).

MANGOM1LK commented 6 months ago

If this change is implemented, I'd also like to see a user-configurable VI width. On my CRT for example the default image width causes the image to look pinched. Genesis Plus GX has something similar and it looks very clean.

therealteamplayer commented 5 months ago

as an example of what I'm talking about, I believe retroarch has this in a "set screen width" setting (which can be seen at 0:43 https://youtu.be/az5fjJHof68). It also lets you select from a few different resolutions

xjsxjs197 commented 5 months ago

Failing that, perhaps there could be an option to not stretch the image (which would mean no shimmering but obviously the aspect ratio would be a bit off, so it'd be a trade-off).

It seems not easy, as many situations need to be considered, but I want to try and see how much the image quality can be improved

xjsxjs197 commented 4 months ago

I have specially compiled a proportionally scaled version, and I am not sure if it is the effect you want. I cannot see a significant difference here. Due to frequent switching of display modes, you may see a flickering effect. boot.zip

therealteamplayer commented 4 months ago

I have specially compiled a proportionally scaled version, and I am not sure if it is the effect you want. I cannot see a significant difference here. Due to frequent switching of display modes, you may see a flickering effect. boot.zip

This doesn't do much to fix the uneven pixel widths/shimmering issue and if anything makes it worse, the image in Castlevania SotN is squished far too much. So this doesn't seem like the right approach especially since the image is also blurry with bilinear turned off.

I don't really know much about how the scaling works on this project but ideally, to avoid any shimmering due to uneven pixel widths, the 240p image should always be an exact 2x integer scale without any other stretching or scaling of the image.

I might be wrong on this, but I believe that by then using the XFB afterwards, you can stretch the integer scaled image horizontally to fix any aspect ratio problems without introducing shimmering? That's how it works in things like RetroArch at least