-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect 1:1 Pixel Aspect Ratio causes scaling artifacts #31
Comments
I can get a good vertical integer display by doing it like: I don't know how to code it in a cleaner way and respect the original ratio but if should be possible to change libretro.cpp only. As a reference, mednafen stand-alone scales the picture like this in integer scale: |
There's probably no perfect solution for the width if pixels aren't square: |
The scanline scaling feature of this core is incorrect in terms of Retroarch. Retroarch is supposed to do the scaling, not the cores, and Retroarch probably does a much better job using better scaling algorithms (and configurable) anyway. The change I made works in both dimensions if the user selects the core's maximum scanline option. The core outputs to a fixed-dimension, worst-case, maximum-size buffer that the TurboGrafx-16 could ever use. The RETRO_ENVIRONMENT_SET_GEOMETRY API tells Retroarch to adjust it's scaling within the user's display area while applying the user's selected Aspect Ratio. By default, this core's aspect ratio ("Core Provided") is always 4:3, which might not be always correct in the first place. I prefer playing emulators with 1:1 pixel aspect ratio because then I don't have to worry about the scaling algorithm used by the emulator, which is arbitrary. Crispy 1:1 sample-to-pixel looks great. In other words, there definitely is a perfect solution. The pixels aren't square if the user chooses something other than a 1:1 aspect ratio in Retroarch's configuration. My change perfectly allows Retroarch to scale the width. The core's scanline scaling was broken before and after my change. It's a separate bug. |
That's perfectly OK as long as everything is optional. But prior to your commit, at non integer scale, we could use the scanline menu to remove lines and cut the black bars on top and bottom of the screen. That's not working after it. |
The scanline scaling had and has incorrect scaling and thus artifacts. It was always broken. Sure, it might be broken differently now, but it's "breaking in the right direction." :P The fixed feature would adjust the values sent to RETRO_ENVIRONMENT_SET_GEOMETRY for line hiding. Some dimensions don't work? Really? Are we sure that the game itself doesn't output an off-centered image or something? I tested the opening cutscenes from Ys Books I & II which use all sorts of crazy resolutions, and that works. If I had time, I'd check this out sooner, but ha. |
Pull Request fixing scaling of line hiding: #40 |
This is still broken. I don't know when Retroarch's Online Updater builds a new core, but the reported Pixel Aspect Ratio is incorrect. The pixels are not square. |
What did you notice? |
Just boot up Ys Books I + II, or any game, actually. With the Aspect Ratio set to 1:1 (PAR), even the BIOS screen has non-uniform pixels. Since 1:1 (PAR) is incorrect, all other aspect ratios also have core-caused scaling artifacts, too. |
I don't have Ys but tried Ninja Spirit and PC KID 2, I zoomed in in Photoshop, I see no problem. |
Integer scale is definitely on. I've tried this on two Windows computers and one Linux computer. If you can't see the fat and/or squished square pixels in a static image, observe some motion. The shimmering (caused by the scaling artifacts) is horrible. Make sure you're not using any pixel shaders or scanlines or anything. |
I've tried it once again with PC Genjin 2. It was working for you before when we fixed it? |
Oh wow, I'm not sure what exactly I was smoking yesterday. It works fine... I forgot that Integer Scaling isn't saved in the Retroarch configuration, I guess? I'm sorry for wasting your time. YES! Crispy pixels! Finally! (I hadn't tested the big change until this month.) |
Integer Scaling does save to the config |
It was probably me getting confused with the Linux build, because the configuration file has to be changed manually. I was seeing ghosts, and frustration never helps. ;) |
Use RETRO_ENVIRONMENT_SET_GEOMETRY when TurboGrafx-16 changes resolutions. #30
The text was updated successfully, but these errors were encountered: