Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

Baked + Realtime Light Shadow Problem

Discussion in '5.4 Beta' started by delphinius81, Jul 22, 2016.

  1. delphinius81


    Mar 6, 2012
    I'm working on upgrading a 5.3.5p8 VR project to 5.4 to take advantage of single pass rendering, but I'm running into a problem with lighting. In my scene, I use a mix of baked and realtime lighting. My scene is set such that I have a desk in a room. There is a point light on the ceiling and another point light in a lamp on the desk. Both of these lights are set to bake mode with culling mask set to everything.

    I also have a Realtime directional light in my scene. This light has it's culling mask set to "Shadow."

    On top of the desk I have a quad that is put into a "Shadow" layer. This quad is also marked static so that it receives baked lighting from the point lights. The quad is marked to receive shadows.

    I then have a dynamic object in my scene. It is in the "Shadow" layer and marked to cast and receive shadows.

    My goal is to have baked lighting from the point lights combine with the shadow from the dynamic object appear on the quad at run time. This was working fine for me in 5.3.5p8 and earlier. However, in 5.4.0f2 when I enable the dynamic object the entire quad is shadowed instead of just the direct area that should be shadowed. It looks like the following:

    No dynamic object: NoDynamicObject.png

    With non-static object:

    You can see how the quad in the second image receives the shadow from the non-static capsule, but is also incorrectly darkened.

    I have tried adjusting the shadow settings on my directional light and changing the shadow quality settings, however there is no improvement unless I set Shadow "Strength" to 1. However, this produces poor visuals and the ambient lighting you would expect to soften the shadow effect is removed.

    This definitely feels like a bug to me where shadow strength is being incorrectly applied to static objects marked to receive dynamic shadows. II wanted to see if anyone else has noticed this issue. I will file a bug report as well.