Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Resolved Radius on real time Spot/Point lights ruins shadows

Discussion in 'High Definition Render Pipeline' started by andyz, Nov 2, 2020.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,363
    2020.1.8 - real time lights, Forward
    I accidently had a radius of 1 on a spotlight and when the shadows were enabled the entire room on screen has dithered, blurry shadows over it. It looked terrible!
    When I finally discovered that the radius needs to be very small I still found that almost any radius is too much due to the dithered blur around any shadows.

    Is there any option not to have dithering on the soft shadows, as it looks poor?

    Edit: I see this is high quality shadow filtering - soft/dithered while the other modes dim the light as radius increases which is odd...
     
    Last edited: Nov 2, 2020
  2. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, are you using Temporal Anti-aliasing?

    With TAA:
    upload_2020-11-2_22-45-40.png

    Without TAA:
    upload_2020-11-2_22-45-45.png


    The high-quality filtering requires TAA to work efficiently. You could alternatively increase the Samples (Blockers and Filter), but it will greatly increase the cost, and won't look as smooth as TAA with a much lower sample count:

    upload_2020-11-2_22-51-22.png
     
  3. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    The radius of the light should match the radius of the light bulb, or whatever is used to generate the lighting. This is usually just a few centimeters (typically 0.025 for a standard bulb).

    The range on the other hand can be many meters.
     
    chadfranklin47 likes this.
  4. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,363
    Ok thanks, I suspected this, but not using TAA since MSAA in forward just looks better for me otherwise (and no need for motion vectors)
     
  5. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Several expensive HDRP effects (or the ones that rely on some form of jittering) will need TAA to look optimal.

    And TAA is vastly cheaper than MSAA. But, if MSAA-only works for your use case, then that's perfectly fine. ;)
     
  6. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,363
    OK but can I do TAA without motion vectors which tend to lead to a blurred appearance?
     
    Last edited: Nov 3, 2020
  7. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    You must have motion vectors enabled for TAA.

    You should look into HDRP 9/10 btw, there have been many improvements to the TAA in HDRP, and it's possible to get a much sharper image with less ghosting.

    There is no denying that you will still get some ghosting/trailing on (fast) moving objects, but it's less perceptible now than previously with HDRP 7/8. It also depends on the type of content you have in your project, if you have a lot of noisy high contrast assets, this is where TAA, no matter the engine, will struggle more.
     
    andyz likes this.