Significant ghosting artifacts in UE5.1.1
ms-dne opened this issue · comments
Hi!
We noticed severe ghosting artifacts while testing the FSR2.2 plugin for UE5.1.1 vanilla.
Steps to reproduce:
- Activate the FSR2.2 plugin in UE5
- In UE, create a Third Person sample map
- Start the map with
-game
- Flags set:
r.FidelityFX.FSR2.Enabled 1
r.FidelityFX.FSR2.QualityMode 1
r.Velocity.ForceOutput 1
- Disable motion blur with
show motionblur
- Check that the FSR2 plugin is active with
Ctrl+Shift+,
there should be an entry inScene>PostProcessing>ThirdParty FFSRTemporalUpscaler
- Check that velocity is defined everywhere with
vis SceneVelocity
- Notice ghosting artefacts while slowly turning the camera around the player pawn.
We weren’t able to address this issue yet but here are some of our findings so far:
The issue only happens when the camera is moving.
After enabling FFX_FSR2_ENABLE_DEBUG_CHECKING
, we got the warn "frameTimeDelta is less than 1.0f - this value should be milliseconds (~16.6f for 60fps)"
.
In FSR2TemporalUpscaler.cpp:1599
, it should probably be instead:
Fsr2DispatchParams.frameTimeDelta = View.Family->Time.GetDeltaWorldTimeSeconds() * 1000.0f;
Logs show some other warns concerning cameraNear
and cameraFar
, but these parameters aren’t used.
We noticed that the FSR2MotionVectorTexture
was exhibiting an odd behaviour, where it would suddenly show negative values for a few frames at regular intervals (shown in red).
The bottom 3 pixels of FSR2MotionVectorTexture
are also wrong because it seems that SceneVelocity
and SceneDepth
are both zero here; this makes the analysis of the converted velocity a bit inconvenient.
In PostProcessFFX_FSR2ConvertVelocity.usf
, we investigated the branch where ComputeStaticVelocity()
is used and it pointed us towards this PR: https://github.com/EpicGames/UnrealEngine/pull/6933, but it wasn’t clear to us that the problem came from motion vectors specifically.
Analysing sequences of frames in PIX with slight camera movement showed that FSR2_LockStatus[LOCK_LIFETIME_REMAINING]
was still increasing on the boundary of objects after disocclusion of the background with a significant depth separation:
We tried to disable the locking mechanism by force-killing locks in ffx_fsr2_accumulate.h/FinalizeLockStatus()
, which greatly reduced ghosting artifacts, but not entirely:
Is this issue known? Can this be a configuration issue, or a motion vectors issue?
Thanks for any help!
I have a same problem, have you solved it?
Hello, we were only able to reduce the artifacts by setting the following in FSR2TemporalUpscaler.cpp:
Fsr2DispatchParams.cameraNear = FLT_MAX;
Fsr2DispatchParams.cameraFar = View.ViewMatrices.ComputeNearPlane();
Also, the issue didn’t seem to happen after changing the material on the skeletal mesh to a black material. But with a lit, metallic material we still have minor 1-frame ghosting pixels that are quite noticeable.
Thank you for your quick answer. It looks like a bug in the FSR 2.2 plugin, version 2.1 is fine now