PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.45k stars 1.59k forks source link

[BUG]: integer scaling does not work at 1x scaling factor. #6243

Open gravitone opened 2 years ago

gravitone commented 2 years ago

Describe the Bug

Integer scaling does not work when the scaling factor is 1x. The image is stretched across the full panel causing uneven scaling and shimmer as a result. this does not happen on higher resolution displays when the scaling factor is at least 2x, then it works as expected.

Reproduction Steps

Set a display to 640x480 resolution, load up a game outputting a 640x480 frame and switch it to fullscreen.

Expected Behavior

I have a 640x480 display, game output is usually at 640x448, I would like it to present at 1:1 pixel mapping with 16 pixel bars on top and bottom when integer scaling is enabled.

PCSX2 Revision

1.7.2823

Operating System

Windows 11

If Linux - Specify Distro

No response

refractionpcsx2 commented 2 years ago

why would it work?

the point in integer scaling is you can fit whole pixels scaled perfectly, if you go below 1:1 pixels, you're talking half pixels, so it can't scale, that goes entirely against the entire purpose of it.

as for the 448 think, the best I can suggest is that this is covered by #6224

If I've misunderstood you, please correct me.

gravitone commented 2 years ago

Not scaling below 1:1 pixels though its not scaling perfectly as it should the full output frame from the emulator fits on the 480 lines display, 448 output should map to: 16 lines black, 448 lines display, 16 lines black, with integer scaling to fit the full 640x480 frame of the monitor, but it doesn't. it stretches the 448 lines to 480 in a non-integer way when integer scaling is enabled. It seems integer scaling is ignored completely in the current implementation when toggled, unless the scaling factor is at least 2x or more.

refractionpcsx2 commented 2 years ago

okay then it sounds like the request I linked above covers that, because as it is the emulator will fix to 4:3 which may not be completely right for NTSC, but the above request (to me) seems to want to use the output resolution the game is using, so that will be a 1:1, but some games will have bad aspect ratios unless you use screen offsets (which enforces the actual output resolution), but that will introduce blurring.

gravitone commented 2 years ago

Yeah, there's no ideal 1 size fits all solution for fixed pixel displays, but a 1:1 pixel mapping option selectable in the aspect ratio box would solve most issues, at least for me with a low resolution 4:3 LCD display. Sure the output result is slightly squished and not 4:3, but its preferable to scaling artifacts. If you think the above issue covers this adequately enough you're welcome to close this one.