libretro / LRPS2

GNU General Public License v2.0
165 stars 48 forks source link

PCSX2 core scales image, and incorrectly reports resolution to RA #141

Open mntorankusu opened 3 years ago

mntorankusu commented 3 years ago

The PCSX2 core is currently scaling the output image before giving it to Retroarch. Things like aspect ratio, integer scaling, bilinear filtering, and shaders are all user-configurable features in Retroarch that are rendered useless when the core handles scaling itself before passing the image off. Scanlines and CRT filters won't work correctly without a clean output, and It just makes the image blurrier because it ends up being scaled multiple times for no reason. prescale

In addition, I believe it's also reporting the new scaled output resolution incorrectly, because integer scaling is showing moire/shimmering artifacts. Not sure if this varies by game, but in Metal Gear Solid 2, the Retroarch scaling menu shows that the resolution is 640x448, but manually setting it to a multiple of 640x480 fixes the issue, so I believe that the core is scaling to 640x480 but then telling Retroarch that the resolution is 640x448 (at least in this game). integerscale

inactive123 commented 3 years ago

I think MGS2 would be a 640x448 interlaced game (or lower), PS2 rarely outputted at 640x480 (non-interlaced) because of the low VRAM.

Some games render at odd resolutions like 512x416, like Final Fantasy 10/10-2. PS2 games and their resolutions are all over the place.

But yes, I believe currently there is scaling being done in plugins/GS that is just plain wrong. You can see similar issues with it here -

https://github.com/libretro/pcsx2/issues/136

What complicates it is that the GS plugin has to often times merge two fields into one output image [for interlaced games I assume] (and some games seem to have specific rules, like I saw Persona 4 mentioned a lot in the comments), so basically it does resizing and scaling already under the hood instead of just passing along a raw frame buffer output image. Basically PS2 games used interlaced video for the vast majority of its games, there were a few that you could enable progressive scan output on but they were rare since only a few TVs at the time supported this.