Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug casting strange shadows around the player in HDRP

Discussion in 'High Definition Render Pipeline' started by Dnurr, Aug 8, 2022.

  1. Dnurr

    Dnurr

    Joined:
    Nov 28, 2021
    Posts:
    17
    [2021.3.7f1] I have a problem in HDRP 12.1.7 with shadow casting. As you can see the light casts a strange shadow around the player object.
    What is the problem? And what could be the solution??
    immagine_2022-08-08_145811753.png

    Here are the settings for the shadows on the light game object:
    immagine_2022-08-08_150704753.png

    I have read in other forums that maybe I need to change the normal bias, or something like that, but I don't find any settings with that name... :D

    Edit: I solved it by setting Filtering Quality from High to Medium (Project Settings > Quality > HDRP > Lighting > Shadows > Filtering Quality)
     
    Last edited: Aug 8, 2022
  2. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,133
    this is a bug I reported a while ago, unfortunately still not completely fixed.
    If you still want to use High quality shadow filtering and somewhat workaround this bug, then use cascade blending (heavily).

    You also need to check the shadow smoothness value (only available in high filtering), the smoother you set your shadows, the more severe this issue will become.

    Shadow smoothness for directional light is controlled by the the light's Angular Diameter parameter
     
  3. Dnurr

    Dnurr

    Joined:
    Nov 28, 2021
    Posts:
    17
    Thanks for hints and the quickly response
    Yes, I tried with High quality in shadow filtering option and setting the Angular Diameter to a little value, but the result is a really pixelated shadow. So, also for better performance, I prefer using Medium quality
     
  4. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,133
    It shouldn't be pixelated, make sure "update/refresh" mode is enabled in the scene view so shadows can be denoised, to see how it would look in-game.

    And check the high quality shadow settings in your directional light (blocker samples, etc) increase them if necessary
    High filtered shadows also rely on Temporal AntiAliasing, it helps fix the pixelated look or any noise so you might have to use that as well if you want High quality shadows.
     
    Dnurr likes this.
  5. Dnurr

    Dnurr

    Joined:
    Nov 28, 2021
    Posts:
    17
    Ok, I will try as soon as possible. Thanks a lot!
     
  6. zevonbiebelbrott

    zevonbiebelbrott

    Joined:
    Feb 14, 2021
    Posts:
    118
    Its one year later and I just posted a thread because im having this exact same issue, I just found this thread now and your shadow bug looks exactly the same as what im experiencing, but its in a Build only for me.