Search Unity

Why does URP look better than HDRP?

Discussion in 'High Definition Render Pipeline' started by Fedora_Dev, Mar 13, 2021.

  1. Fedora_Dev

    Fedora_Dev

    Joined:
    Oct 28, 2016
    Posts:
    35
    URP
    upload_2021-3-12_18-47-33.png

    HDRP
    upload_2021-3-12_18-47-50.png

    These were each built in their own projects. The lighting and shadow settings of each project match where possible, e.g. shadow cascades, max distance, etc. Both are using a single directional light in mixed mode, only the URP project has a few spot lights baked into the scene. Both have lighting baked/generated. Both have reflection probes in the main room. All geometry is static. I tried using contact shadows in HDRP, however the results looked even worse.

    I think it's odd that on the directional light in HDRP, Slope-Scale Depth Bias and Normal Bias don't actually change anything. In fact, Slope Scale Depth Bias can only be set to 0.5 as any other value causes the light to straight up disappear.

    All settings in HDRP are at high/ultra. I'm currently on Unity 2020.2.2f1 with URP 10.2.2 and HDRP 10.2.2.
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    URP looks like it has baked lighting while HDRP doesn't?
     
  3. Fedora_Dev

    Fedora_Dev

    Joined:
    Oct 28, 2016
    Posts:
    35
    Both have a single directional light set to Mixed. URP does have a couple spot lights that are baked only, but the lighting from the directional light is still mostly realtime.
     
  4. Fedora_Dev

    Fedora_Dev

    Joined:
    Oct 28, 2016
    Posts:
    35
    Oh it might be worth mentioning that the lighting mode of each scene is set to Baked Indirect. All of the lightmapping settings are exactly the same in each.
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    The spotlights are missing in HDRP though, no? Which makes me think lighting is not baked.
     
  6. Fedora_Dev

    Fedora_Dev

    Joined:
    Oct 28, 2016
    Posts:
    35
    The spotlights haven't been added to the scene in the HDRP project yet because I'm still fiddling with the directional light. The scene is already baked. Though, even if the scene weren't baked, the shadows on the directional light shouldn't look that bad.

    At least I thought so. I finally found the problem with my HDRP settings. On the directional light, there's an option called 'Angular Diameter Scale' Setting it to 0 fixed all of the issues. I'm a bit sad that Unity thinks soft shadows should look the way they did, though. That grainy mess really did look like garbage. Plus having the light bleed through the wall just because it's soft doesn't seem ideal.

    In any case, thanks for replying!
     
    AcidArrow likes this.
  7. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    If you need good looking soft shadows, then set filtering quality to "high" in the HDRP settings, which will enable PCSS filtering. Then open additional shadow settings on the light component, adjust sample and blocker sample counts, set up reasonable shadow resolution and there you go.