I am trying to set up mixed lighting for realtime shadows in a scene that was originally configured only for baked lighting. However, I cannot get mixed lighting to work, because in this scene mixed lights behave identically to baked lights.
When I add a new real-time light to the scene, it creates realtime illumination and shadows on both static and non-static GameObjects as normal. If I switch it to “Mixed” and bake the scene, the light bakes correctly on static GameObjects, but stops casting realtime illumination and shadows on non-static GameObjects (in other words, it behaves exactly the same as a light set to “Baked”). Likewise, if I change an existing Baked light to Mixed and re-bake, the light continues to behave as if it was set to “Baked”, with no realtime illumination or shadows.
Once a Mixed or Baked light has been baked, switching its mode to “Realtime” has no immediate effect. I have to re-bake the scene to get the light to behave correctly. However, if I duplicate the light, the duplicate will behave as a real-time light without needing to re-bake the scene.
- Scene Lighting Mode is set to “Shadowmask”
- Shadow maps are enabled in the HDRP settings
- Shadow maps are enabled in the light settings for each light, with resolution set to 2048, and configured to update Every Frame.
- All lights and meshes use the default lighting layer.
- I’ve played around with the Volume Profile settings for the scene but it does not affect this mixed-lighting issue.
So far I’ve only observed this behavior in one scene; if I create a new scene and throw together a quick test configuration, Mixed lights behave the way they’re supposed to.
Why would Mixed lights behave like Baked lights in one scene?
-
Unity 2020.3.16f1
-
HDRP 10.6.0
-
Baking with Progressive GPU lightmapper