Skip to content
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

[Request/Suggestion] Would it be possible to port over the 4xRGSS downsampling post-processing option from PCSX2? #44

Open
Azurfel opened this issue Jan 9, 2025 · 10 comments

Comments

@Azurfel
Copy link

Azurfel commented Jan 9, 2025

I suspect it would significantly reduce (if not eliminate) the high frequency detail shimmer that can sometimes be seen even with 16xSSAA in paraLLEl-GS.

(The ground and cliffside during Final Fantasy X's opening cinematic are a good showcase for this issue.)

@Azurfel Azurfel changed the title Would it be possible to port over the 4xRGSS downsampling post-processing option from PCSX2? [Request/Suggestion] Would it be possible to port over the 4xRGSS downsampling post-processing option from PCSX2? Jan 9, 2025
@LibretroAdmin
Copy link
Collaborator

This is probably hardwired into gsdx, right?

It might make more sense if someone just ported that to a slang shader.

@hizzlekizzle
Copy link
Collaborator

if it's this: https://git.shuri.gg/ShuriZma/pcsx2/commit/32aa24f6fd78a22be294c869efe757c88c7c7b6a?style=split&whitespace=ignore-eol&show-outdated=

it's actually pretty basic (not saying it's bad, of course), and we have many more sophisticated downsampling shaders already in the repo.

What is the output scale of the core when it's exhibiting the shimmering?

@LibretroAdmin
Copy link
Collaborator

LibretroAdmin commented Jan 9, 2025

Oh yeah I ripped out all those 'present' shaders out of GSdx, I assumed we just wanted the raw output and that all these extra frontend shaders would just impose extra latency.

The reasoning was this is best left to the libretro frontend's own shader subsystem to do the frontend shader postprocessing, in this case RetroArch.

@Azurfel
Copy link
Author

Azurfel commented Jan 9, 2025

I don't think it would work as a shader, since LRPS2/paraLLEl-GS needs to downsample to native resolution pre-shaders for proper scaling with, for example, CRT shaders.

Tho thinking on it further, i don't think the PCSX2 4xRGSS downsampling post-process would work after all, since that would presumably be applied after paraLLEl-GS has already downsampled back to native resolution.

PCSX2 standalone exhibits similar shimmering in FFX at 16x (or even 24x) without the 4xRGSS downsampling post-processing option enabled, which is what made me think it could help here until i thought about it more, but the proper fix here will likely involve modifying paraLLEl-GS's algorithm for downsampling from 16x to 1x.

What is the output scale of the core when it's exhibiting the shimmering?

1x, 2x, 3x, 4x, 5x, and core provided all exhibit the shimmering, both with PCRTC Screen Offsets On, and Off, and/or PCRTC Anti-Blur On, and Off (tho PCRTC Anti-Blur On makes it much more noticeable.)

@LibretroAdmin
Copy link
Collaborator

LibretroAdmin commented Jan 9, 2025

PCSX2 standalone exhibits similar shimmering in FFX at 16x (or even 24x) without the 4xRGSS downsampling post-processing option enabled, which is what made me think it could help here until i thought about it more, but the proper fix here will likely involve modifying paraLLEl-GS's algorithm for downsampling from 16x to 1x.

Can you make a recording of this shimmering? And have you confirmed if that shimmering is there with retroarch and the core? I find it really hard to notice any shimmering with 16x SSAA in PGS, it basically cleans up the image entirely as far as i have noticed, and I've went through over 300/500 games so far. But maybe you're noticing something so far I haven't.

Personally I'm not a fan of superimposing extra 'present' shaders on top of the image in gsdx or frankly any core for that matter. It just adds extra performance overhead and latency when the core should just pass the output image as unscaled and unfiltered as possible. The frontend is then responsible for any scaling or filtering.

I'm also unsure if 4xRGSS works at all on parallel-gs in standalone, this might be placebo you're noticing. I say that because parallel gs doesn't use Gsdx's final output present scaling at all (or at least it doesn't in the libretro core), there is only a very small integration between gsdx and parallel-gs and most of that is just to jump through the gsdx API functions so parallel-gs can do all the work from there.

So in short, I'd like to see some videos from you that show any purported advantage here, and maybe also some visual evidence that this option actually does anything on parallel-gs instead of it just doing something on gsdx. If I bring this 'present' stuff back at all it better be for a very good reason, and if I DO bring it back (but I'd rather not), then it should at the very least be an on/off option, because I don't want that extra overhead to just be superimposed all the time if the user has no need for it (because I have the feeling that this extra present shader will affect the deinterlacing results as well).

@LibretroAdmin
Copy link
Collaborator

LibretroAdmin commented Jan 9, 2025

Also, I've asked @hizzlekizzle to make a countervideo when you present your video showing this in action (with a shader in slang_shaders), because we are convinced for now this is just a mere frontend shader and there is really no advantage to doing this in the core when this can be done by the frontend already. But we'll see based on your video.

@Azurfel
Copy link
Author

Azurfel commented Jan 9, 2025

I will take get videorecorded later tonight or tomorrow, have to head out now.

Standalone was with GSdx + 4xRGSS, not paraLLEl-GS. Standalone with GSdx at 16x just exhibits very similar shimmering.

I'm also thinking a different solution will be needed for retroarch+paraLLEl-GS tho at this point.

Also, do you have High-res scanout On? I am very explicitly keeping that turned off for proper compatibility with CRT shaders.

@LibretroAdmin
Copy link
Collaborator

Also, do you have High-res scanout On? I am very explicitly keeping that turned off for proper compatibility with CRT shaders.

When I say I get no shimmering, I mean with high-res scanout and 16x SSAA in parallel-gs yes. It completely cleans it up.

@Azurfel
Copy link
Author

Azurfel commented Jan 10, 2025

16xSSAA downsampled to 1x

16xSSAA w/ High-res scanout

Note particularly the ground on the left at the start, the building on the left, Wakka's suspenders and hair.

As mentioned, on further thought i don't think that the 4xRGSS downsampling post-processing option would be a good fix after all. (Unless perhaps it were applied before paraLLEl-GS is downsampled from 16x? Applying it to the final downsampled output definitely wouldn't work tho.)

I suspect the issue is related how paraLLEl-GS is being downsampled to the final presentation resolution, whether that is 1x/native or the high-res scanout resolution.

@hizzlekizzle
Copy link
Collaborator

I suspect the issue is related how paraLLEl-GS is being downsampled to the final presentation resolution, whether that is 1x/native or the high-res scanout resolution.

Yeah, you're correct here. However, if you go to settings > video > scaling and enable bilinear filtering, it should clean it right up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants