Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Is there a way to increase the max shadow map resolution when using HDRP?

Discussion in 'Graphics Experimental Previews' started by Ehredt, Aug 10, 2018.

  1. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    We're capped at 4096x4096. If there's a simple way to raise it, it would make a big difference.
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    What are you trying to achieve with a such big shadow map ? Note that if your issue is with the directional shadow, tweaking the shadow cascade distances can probably help.
     
  3. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    We have very few hardware limitations and want our shadows to be as realistic as possible. Right now they're jagged and flickery around the edges. Our animator improved it somewhat by setting up eight different lights in the same position at slightly different angles, but obviously this isn't ideal.

    What would be the best way to change the shadow cascade distances? Would I just set QualitySettings.shadowCascades to 4, or am I looking for a different setting?
     
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    The cascade settings are now in the global shadow settings : https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/Global-Shadow-Settings

    You can also boost the resolution of the shadow maps atlas in the HDRP Asset : https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/HDRP-Asset
    Note that this texture will contains all the shadows of the visible lights of your scene, and the cascades of the directional. So a 4K atlas can not contain a 4K directional shadow with the 4 atlases.
     
  5. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    Excellent, thank you!
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You can allocate more or less of this space on the directional light for further resolution and/or use contact shadows option.