martymcmodding / iMMERSE

Marty's Mods Epic ReShade Effects
Other
275 stars 21 forks source link

MXAO filtering causes artifacts #16

Open rigopoui opened 1 month ago

rigopoui commented 1 month ago

When setting the filtering property to either 1 or 2, it causes these line artifacts to appear. See images below, first without filtering, and then with filtering. They are especially visible on the door in the middle of the images. And in actual gameplay, are pretty visible in light-colored areas. no-filtering with-filtering

martymcmodding commented 1 month ago

This looks to me like a very corrupted depth buffer precision. If you are using logarithmic depth buffer, disable it. It barely does anything and only causes problems for AO altogether.

rigopoui commented 1 month ago

Logarithmic depth buffer setting is off. Far plane and multiplier are at default values. I am attatching a shot of the depth buffer as well. It looks ok to me. This example is from metroid prime on the Dolphin emulator, but I have run into this in other games. WoW 3.3.5 client comes to mind as another recent example. Dolphin 2024-10-15 18-45-40

martymcmodding commented 1 month ago

You can't tell from the debug view, because the depth buffer value needs higher precision.

What resolution do you play the game at and what ReShade version do you use?

rigopoui commented 1 month ago

Did some testing on another game, to make sure it's not a fluke of the emulator running in bizzare internal resolutions and such.

It makes sense that depth precision is at fault as you say, as I see it happening on distant objects, where the precision is probably not enough to accurately judge their distance. Generally, when setting the fadeout distance to <0.5, the artifact is much less apparent. But still, I think a few months ago, I never saw this artifact, and I regularly use mxao in my games.

With filtering disabled: 2024-10-18 11_16_42-Hellblade_ Senua's Sacrifice

With filtering set to '1': 2024-10-18 11_16_52-Hellblade_ Senua's Sacrifice

With filtering set to '2': 2024-10-18 11_16_56-Hellblade_ Senua's Sacrifice Shot of how it looks ingame: 2024-10-18 11_17_01-Hellblade_ Senua's Sacrifice

Depth buffer view using the 'Display Depth' reshade effect: 2024-10-18 11_19_09-Hellblade_ Senua's Sacrifice

martymcmodding commented 1 month ago

Late reply but alas: I've tested with a bunch of the games you mentioned but couldn't reproduce this anywhere which is... very strange to say the least. This is definitely not an easy bug to overlook and I don't understand why same ReShade + same game is not deterministic.

For sanity sake, can I see the global preprocessor definitions you're using?

I might also add, I'm working on a rather large update to all the depth-depending shaders that is intended to massively improve DLSS/FSR/TAA compatibility. Since this axes the current filtering entirely, quite possibly this bug is fixed along the way, even if you're not using these.

rigopoui commented 1 month ago

In the case of Senua, it was a fresh reshade install, with fully default pre-processor definitions. I've now tested in other games, and for me it seems to occur in every game, albeit to varying degrees.

Could I provide a log or something that would help you?

Perhaps it is somehow hardware specific? I'm running an AMD card, the 7900 GRE.