Search Unity

HDRP Pixelated shadows

Discussion in 'High Definition Render Pipeline' started by N_Velasquez, Oct 15, 2020.

  1. N_Velasquez

    N_Velasquez

    Joined:
    May 1, 2018
    Posts:
    6
    Hello, I was using HDRP with default settings and noticed that with my realtime spot lights the shadows had some really weird artifacting. upload_2020-10-15_9-55-11.png

    So everwhere there is a shadow, it looks like there is a weird "Anti-aliasing" effect to it.

    Any help would be greatly appreciated.

    Thanks!
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    This is not a shadow issue, but probably an issue with the number of dynamic lights that you have in your scene.
    HDRP is limited to 24 dynamic lights affecting a tile (the squares that you can see) on screen.
     
  3. N_Velasquez

    N_Velasquez

    Joined:
    May 1, 2018
    Posts:
    6
    Is there any way to bump that number up? Or should I go down the baked lighting route?
     
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    It is possible to remove this limit, but it has non negligible performances costs.
    You should look into tweaking your lights (in particular the influence range) and look into baking indeed.
     
  5. N_Velasquez

    N_Velasquez

    Joined:
    May 1, 2018
    Posts:
    6
    How would I go about changing that number? Like what setting would I change?

    We are using this to render out a video. So its just capturing each frame and stitching them together. We are not trying to do this in playtime, so if goes at 5 fps we are fine with that.
     
  6. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    In the frame settings (either per camera, or in the HDRP default settings in the Project Settings window), at the bottom, section "Light Loop Debug", you can disable "Deferred Tile". This will totally remove the limitation.
    upload_2020-10-15_20-17-11.png
     
  7. N_Velasquez

    N_Velasquez

    Joined:
    May 1, 2018
    Posts:
    6
    That was totally the fix! However, now I am running into the problem of the reflections having a similar issue. upload_2020-10-15_11-21-0.png

    Any other setting to fix the reflections?

    EDIT: I forgot to mention that the material is transparent.
     
    Last edited: Oct 15, 2020
  8. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    This is not an issues with reflections I think, but similarly as before, I think you've hit the limit of 24 lights per cluser (similar as the tiles, but for transparent objects).
    I don't know a way to overcome this, but I will ask.
     
  9. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    Sorry, it seems that there is not solution for this issues for the moment.
    You will have to reduce the amount of lights that influence those objects.
     
  10. N_Velasquez

    N_Velasquez

    Joined:
    May 1, 2018
    Posts:
    6
    Thank you for the insight into this issue. Is there any way to tell in Unity how many lights are in a tile/cluser? Or how to tell how big a tile/cluser is?
     
  11. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    No. All this is hard coded and not configurable.
    Even if HDRP is open source and you can edit the rendering code, this is not a trivial change to do.
     
  12. N_Velasquez

    N_Velasquez

    Joined:
    May 1, 2018
    Posts:
    6
    Sorry, I think there was a miscommunication. I was wondering how I can figure out how large the tile/cluser is? That way I can try and see all the lights that might be in that tile.
     
  13. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    195
    You can use the Render Pipeline Debug to visualize the amount of lights per tile/cluster etc. Bildschirmfoto 2020-10-17 um 13.42.58.png
     
    N_Velasquez and Remy_Unity like this.