OptiScaler icon indicating copy to clipboard operation
OptiScaler copied to clipboard

Inverted Buffer in FG

Open matfax opened this issue 1 year ago • 9 comments

Some buffers are inverted, as shown in this debug view. The upper left, lower left, and upper center views are vertically inverted (y values) in CSL2.

Screenshot

The issue exists with "depth buffer invert" init flag enabled and disabled.

matfax avatar Oct 30 '24 22:10 matfax

Oh, this is interesting. Could you provide a log with LogLevel=0 set at nvngx.ini?

cdozdil avatar Oct 31 '24 06:10 cdozdil

Here you go.

OptiScaler.log

I'm using experimental DX12 via Unity flag -force-d3d12.

matfax avatar Oct 31 '24 13:10 matfax

Thanks, looks like this is a classical Unity situation. Will check what can I do 👍

cdozdil avatar Nov 12 '24 09:11 cdozdil

Oddly enough, upscaling debug view doesn't have the issue.

Screenshot 2024-11-12 200924

Like the flag is only passed to the upscaler lib but not the frame gen lib.

matfax avatar Nov 12 '24 19:11 matfax

Actually that's upside down too, that red depth view should be at top right.

cdozdil avatar Nov 13 '24 18:11 cdozdil

Here are two better screenshots.

Screenshot 2024-11-13 195724 Screenshot 2024-11-13 195715

I'm not sure about the debug view "view order", if that's what you mean, but the views themselves seem to be correctly oriented without frame gen.

matfax avatar Nov 13 '24 19:11 matfax

Check image below, this is normal view of debug view.

image

Gray box on bottom left is normally at upper left. So image upscaled upside down and Unity flipped it.

cdozdil avatar Nov 20 '24 08:11 cdozdil

Took me a while to realize exactly what was going on using Optiscaler on Lego Builder's Journey (Unity 😠). Yeah it's upside down, and depth is not inverted apparently, I can move a brick and see the "FG ghost" moving around, it's mirrored when "depth inverted" is on.

Gonckzilla avatar Mar 31 '25 01:03 Gonckzilla

Yes, as described - it's not a z axis issue, so it can't be fixed by the depth buffer inversion option that targets this axis. The "inversion" exists on the vertical axis. It's not just a debug view issue but it's fed to the upscaling in a mirrored state. Because the ghost is moving in the opposite direction.

matfax avatar Mar 31 '25 05:03 matfax

New Nightly build was released with an FG flip for Unity option, so you can try it now to see if it helped.

https://github.com/optiscaler/OptiScaler/releases/tag/nightly

TheRazerMD avatar Jun 28 '25 15:06 TheRazerMD

I haven't managed to test the nightly feature yet because CS2 doesn't run in DX12 mode anymore without crashing, at least on my system. It runs in DX11 though, without FG. Nvidia SM also causes crashes, unless SM Feature Flag 0x4 is set in the profile. Then, SM works according to the monitor framerate, but it doesn't show it as enabled in the Nvidia Stat Overlay.

matfax avatar Jul 16 '25 16:07 matfax