There is a new issue with Depth of Field in 5.6. When used with any temporal-based anti-aliasing (e.g. TAA or TSR), it produces ugly artifacts on the edges of a mesh:
It is much worse when the object is moving.
Is this a known issue?
Update: I’ve attached the repro project for 5.6. Play to see the much worse artifacts when the mesh moves. DofRepro 5.6.zip (1023.3 KB)
Update 2: I’ve reported it via the bug submission form. I’ll post any news here if I have any.
Update 3: I’m trying all the DoF and AA-related console variables and setting the “r.DOF.Scatter.BackgroundCompositing” from 2 (default mode) to 1 or 0 seems to fix it!
But I need to test if it doesn’t introduce some other issues.
I wish I could update my bug report somehow, with that new info Update 3.1: Setting this option to 1 fixes the issue, but the quality of the DoF background suffers a bit. So it’s a temporary half-workaround.
i think it is related to this commit. I guess it was hardcoded to “1 / enabled” before 5.6 and epic found some problems with it so they added cvar and disabled it by default? i don’t know, just a guess.
Try “r.DOF.TAA.CoCBilateralFilterStrength 1”
(“When enabled, you may get stronger noise on edges of objects that separate foreground and background.”)
(“When disabled, you may get stronger ghosting along those same edges.”)
I can confirm that setting this to 1 fixes the issue. Tested on 2 projects in 5.6.
I’ll mark your answer as a solution for others who might encounter this issue. Thank you!
PS. I’ve discovered that you can combine both the “r.DOF.TAA.CoCBilateralFilterStrength 1” and “r.DOF.Scatter.BackgroundCompositing 1” for the sharpest edges on DoF, but the result may vary, depending on your scene.