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

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.

2 Likes

Hero post; thank you really helped me track down similar issue i was having. I wanted to tag on that I am experiencing an issue in 5.5.4 source build where forward shading and msaa with a spotlight configured with a very large attenuation seem to be causing shadow/lighting artifacts as well in the lighting pass. I’ve submitted a bug report with the following steps to reproduce

  1. New project on unreal 5.5.4, this same setup wasn’t an issue in 5.4.2 that I was using before I upgraded
  2. Turn on Forward shading and MSAA in project settings
  3. Create any big floor/plane (static mesh or landscape, material doesnt matter)
  4. Place a spotlight with about 16.0 EV (this doesnt have to be too precise) 25000 units above the floor
  5. Set spotlight attenuation to 32000 so that the light reaches the floor
  6. Zoom around in editor or in standalone game and you can see black line artifacts flicker in and out on the floor

Heres a picture of the artifacts I was seeing

This was not an issue in 5.4.2 source build before I upgraded.

1 Like