We’ve just upgraded our project’s engine to 5.8, from 5.7. When we opened up one of our test maps, we saw that quite a few objects weren’t displaying the correct shadows. Some shadows weren’t appearing at all.
Upon further investigation, we found a few ways that we could get shadows to appear. In one case, just dragging in another light would cause shadows to come back, even if that light was deleted afterwards. On certain meshes, we could also enable Nanite to get shadows to appear.
I’ve attached a video illustrating the problem and a project sample with the same render settings that we’re using with our project. I would suspect it’s one of our project’s render settings, but I wouldn’t expect that those settings should result in this sort of behavior. Any help to fix this would be appreciated.
This looks like a bug related to r.Visibility.LocalLightPrimitiveInteraction mode 2 (enabled if MegaLights is disabled) which was added in 5.8 as the new default. In the sample project provided, Megalights is enabled in the project, but disabled by the PPV, and the logic for r.Visibility.LocalLightPrimitiveInteraction only looks at the project setting (RenderScene.cpp DoesPlatformNeedLocalLightPrimitiveInteraction)
If you set r.Visibility.LocalLightPrimitiveInteraction to 1 it should revert to the expected behavior, and I’ve created a Jira to track the issue with mode 2 which should be visible soon: https://issues.unrealengine.com/issue/UE-386721
Note, if you plan on using Megalights then you can get a performance benefit from mode 2 so definitely profile with mode 1 and 2 to see the perf differences in practices.