Search Unity

  1. How has 2019.2 and the beta been for you so far? Give us feedback in this thread.
    Dismiss Notice
  2. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Feedback HDRP custom cascades support?

Discussion in '2019.1 Beta' started by hippocoder, Apr 2, 2019.

  1. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,276
    upload_2019-4-2_17-42-57.png

    Please :)

    Would solve every shadow problem I have in my open world game. Inside, I only need first 3 cascades anyway.

    I used a dir light cookie on the sun, to proof of concept test this and it looked gorgeous but obviously not the right place to be doing it. Quite frustrating to be near yet so far from a good solution.

    Why current cascades are bad in HDRP:

    Cascades as they are now force the near cascades to be bigger than they should be in order to patch up the joins between cascades. This forces people to use contact shadows and lose even more perf (and contact shadows aren't even reliable to use). Why not just improve cascades for the scenario instead of adding more work?


    By separating the (first - I don't need this but others might) and last cascades but blending them, we can allocate the resolution ranges far better and nearest + furthest have no issues with joins and it will even run quicker. Will also allow projects to avoid using contact shadows.



    You know all this anyway, why do I have to beg :'(

    Pretty please? :D
     
    arkamarante and Mauri like this.
  2. laurenth-unity

    laurenth-unity

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    37
    Hi, I am not sure I understand your issue correctly but in the latest versions of HDRP (2019.1+) you can smoothly blend between cascades.

    Can you let us know if that solves your issue ?
     
    hippocoder likes this.
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,276
    I am on 2019.1 beta 9 and there is unfortunately no smooth cascade blending yet (with HDRP 5.10) is this a bug? Thanks for reply.
     
  4. laurenth-unity

    laurenth-unity

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    37
    oh sorry this is not available yet, I need to dig up why it is not exposed yet. But we have worked on it, probably an issue is still remaining.
     
    hippocoder likes this.
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,276
    Oh fantastic, then I have zero concerns, thank you.
     
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,276
    I enabled debug mode and had a poke around, I was able to overlap the borders in a nice way for the first two cascades. I assume there is a minor fill rate penalty for this? In any case it's made things much nicer.

    I find 0.8 to be a nice value but needs tweaking obviously due to slight near clip issue if I push it too far. But nice improvement where it matters.

    With this tweaking I do not require exotic solutions... and I hope you will make more exposed tweak options for HDRP in general :)
     
  7. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    3,704
    Could you post comparison screenshots? I would like to see/understand how it improves shadows in the same scene over Unity default.
     
    dadude123 likes this.
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,276
    Better you try:
    • enable debug in inspector
    • open HDRP global volume (you should have shadow cascades set up here)
    • it has an array of scriptable assets, so pick the HDShadow one and click it twice to go there
    • scroll down until you find shadow borders rollouts and just play with the values (they are all 0 at default)

    Try 0.8 to start...


    (I'm out of time so this will have to do for now)
     
  9. laurenth-unity

    laurenth-unity

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    37
    Blending should be exposed in the UI (with a few fixes) in HDRP 5.14