I have an issue where the shadows flicker in all of my levels. I am doing a lot of post processing (cel shading, flattened colors, and outlines), but I am not sure if it is due to that. Does anyone have a solution for fixing this issue? Here is a video of what I am experiencing.
Hey! Can you show us how you built your material? I can’t figure it out whitout the logic you used.
Okay, we’ll try to solve this issue by isolating each possible cause, as shadow flickering in UE5 is a common problem.
Are you using Lumen?
Try using this console command:
r.DistanceFieldAO 0
Also, you can disable ray tracing on all your meshes—based on your art style, I assume you won’t need it.
I’ll try to replicate your problem tomorrow.
I am using Lumen currently. I tried the command you sent and that did not fix it. I did turn off “Visible in Ray Tracing” on all objects and that made it worse surprisingly. Is there anywhere else I should turn off ray traced shadows other than the objects themselves?
Not sure if it’s related but try tweaking mesh distance field in your mesh settings, you can also select a mesh in the world and set if it affects mesh distance field.
Okay, I was able to reproduce your problem. Unfortunately, it seems that you can’t use Lumen with this setup. If I understand correctly, you’re using a post-process-based toon shader, which means Unreal has to constantly recalculate how all your shaders should look. The issue is that Lumen also continuously calculates lighting, and the two systems don’t work well together.
You’ll need to disable Lumen. To do this, go to Project Settings, then Rendering, search for “Dynamic Global Illumination Method”, and set it to None.
If you really want to use Lumen, I’d suggest changing your approach and using a material-based toon shader instead.
I think you are completely right, if I disable all of the toon shading in my post processing, the issue does not persist. After switching off of Lumen I am not seeing any jittering. However, my shadows look far more pixilated, so that is another issue I will look into fixing. Thank you for the help and information!