Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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,152
    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,152
    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,152
    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.