When investigating [Internal link] Volumetric Fog and Dynamic Shadow disappear on a GameObject when baking a Lightmap with the GameObject disabled, then enabling the GameObject and re-baking the Lightmap - Unity JIRA (unity3d.com) we discovered a regression in 2023.1. A mixed light is both baked into the lightmap and rendering as real-time when falling back to fully baked because we are out of shadow mask channels.
How to reproduce:
1. Open the user project here
https://editorbugs.unity3d.com/api/v1.0/attachments/e8c2ba14-6a63-4db7-a01c-d4a6781fc67d/LightBakeTest.zip
2. Open Scene “ISS_LightBakeTest“ (Assets/Scenes)
3. Bake the Lightmap (Window > Rendering > Lighting, 'Generate Lighting')
4. Activate the “TestLight” GameObject
5. Re-bake the Lightmap (Window > Rendering > Lighting, 'Generate Lighting')
Expected result: The directional light and three of the four spot lights have a channel in the shadow mask map and produce dynamic shadows. The last spot light is fully baked.
Actual result: a spot light light is both rendering as real time AND has direct lighting baked into the lightmap.