Issues with Shadows and MSAA enabled on 5.5 when using distance field indirect shadow.

NeedMoreChili
Sat, 18 Jan 2025 01:09:43 +0000
Rendering

There’s a extremely niche issue with shadowing/MSAA under very specific circumstances in UE 5.5 that I’d like to share a guide for, if anyone else encounters this problem and would rather not spend hours on it. The error can manifest in various ways as terrain losing its light dependent on viewing angle to the light, distance to the camera, sky light and ambient light can seem to turn on and off randomly, or meshes can manifest as screen-space shadow ghost images.

It happens when using the following:

Forward Renderer, any MSAA. The error is not visible if not using MSAA.

Shadows enabled (r.ShadowQuality 1 or higher), MSAA (r.AntiAliasingMethod 3), and, (r.MSAAcount 2, 4, or 8).

Light is BAKED with a stationary directional light (and optionally a sky light).

The light has CSM shadows and distance field shadows.

A mesh, or multiple, has Distance Field Indirect Shadows and Affect Distance Field Lighting enabled. Distance Field Indirect Shadows seems to cause an issue here.

It can be tricky to find initially since accidentally enabling Distance Field Indirect Shadow on a mesh will cause problems for actors outside of it, not the mesh itself.

To fix the issue, look for any meshes with Distance Field Indirect Shadow in the MSAA project and uncheck it. CSM/DF shadows still work on movable meshes with Affect Distance Field Lighting checked. Bake lighting and ensure everything is ok.

For future searches:
The MSAA shadow error can appear as a dark ghost image of meshes, dark blobs on some meshes, directional light and skylight disappearing, a black line or rectangle covering the screen, missing lighting, dark ghost copies of meshes.

4 posts - 4 participants