Search Unity

Bug Shadow at the intersection of 2 fine objects

Discussion in 'Universal Render Pipeline' started by SpeakBeaver, May 17, 2023.

  1. SpeakBeaver

    SpeakBeaver

    Joined:
    Jul 8, 2015
    Posts:
    6
    Hello,

    I have some fines objects in my scene (like opaque walls or barriers) on the ground.
    Either in baked or realtime the shadow don't start at the base of the intersection of my props and the ground like the picture (Red is baked, greens are dynamic cube and plan). There is always a a line of light going throught.

    upload_2023-5-17_16-1-22.png

    I wondering if it's a normal light beheviour or if i can change some shadows options or lighting option to resolve this issue

    Some of my dev environnement settings: Unity 2021.1.10, URP 11.0, Shadows cascade at 2 default level, (CPU baked)

    If a light master have a clue, i will be happy to discuss !
     
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,929
    Yes, this is normal light behavior and happens in all render pipelines (and pretty much all engines that use shadow maps). It even has a name: "peter panning", because it makes objects feel as if they're disconnected from the floor/floating.

    You can adjust the gap using the light's depth/normal bias options. See:
    https://docs.unity3d.com/Manual/ShadowPerformance.html

    Beware of shadow acne though, which is the opposite of peter panning.