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 Understanding the permutation of HDRP settings

Discussion in 'High Definition Render Pipeline' started by sebas77, Jul 27, 2021.

  1. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,630
    I have to be honest, the combination of possible settings in HDRP is overwhelming even for me as a coder. There are still some things I cannot figure out:

    The permutation is made of:

    quality settings
    HDRP rendering pipeline settings
    Camera settings
    Frame settings
    Global Volume Settings.

    I am trying to understand which of these settings I can change according to the quality level. So far this is what we have done:

    we have an HDRP rendering pipeline settings per quality level
    we have a GlobalVolume per quality level but we switch them through code (we read the current quality level and load the relative global volume profile)
    however, I don't understand how the frame settings can change per quality level. Specifically, I am not sure how I can disable shadows. At the moment we are overriding the shadow through the global volume and set the distance to 0, but it seems to me that the only proper way to disable shadows is through the frame settings, but for some reason that I cannot understand, there isn't a way to have a frame setting per quality level like it happens for the rendering pipeline settings.

    Can someone help, please?
     
    Clonkex and chemicalcrux like this.
  2. chemicalcrux

    chemicalcrux

    Joined:
    Mar 16, 2017
    Posts:
    717
    I am also confused by all of this -- I'm unclear where, exactly, I should be doing things.
     
  3. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,630
    @francescoc_unity any help on this one?

    What I essentially need to know is if it matters to override the frame settings for performance purposes and if so how. For example, let's say that my default HDRP settings are these:

    upload_2021-7-28_8-54-25.png
    upload_2021-7-28_8-54-54.png

    None of these flags can be really overriden per quality level. Some of the effects can be anyway disabled using other parameters of the GlobalVolume profile, but I am not sure how safe it is.

    What is your suggested way to override these flags per quality level?
     
  4. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,630
    I start to think that all the effects should be turned off through the volumes, it's just that a lot of effects do not have the "enabled" check which is confusing, but I start to think that the equivalent is achievable with other parameters, like the shadow distance or the motion blur intensity. Someone should confirm this.
     
    Clonkex likes this.
  5. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Worth noting that:
    - You can change the frame settings at runtime.
    - You can change volume components values at runtime.
    - You can't change HDRP asset values directly at runtime.
    - Only way to change settings from HDRP asset is to make multiple such assets and assigning them to multiple Quality tiers - which you can then swap between at runtime.
    - Frame settings can only enable values enabled on currently active HDRP asset.

    Also afaik you can't turn all things full off from volume, like subsurface scattering or distortion - which both are measurable costs when doing gpu timing with HDRP - despite if you used any materials that used mentioned things.

    I'm also going to quote HDRP Asset docs here (https://docs.unity3d.com/Packages/c...s.high-definition@12.0/manual/HDRP-Asset.html):
     
    Last edited: Jul 28, 2021
  6. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,630
    I prefer loading the volume profiles like I load the HDRP settings, it's more consistent as logic. If I need to have 5 different profiles for the frame settings, I would need to create my own serialization system to load the 5 different profiles and set them at run time. I would prefer a consistent solution.

    upload_2021-7-28_22-42-17.png

    upload_2021-7-28_22-42-22.png

    is something like this for the frame settings a plausible solution too?
     
  7. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,630
    I found a bit hacky but OK way to solve the problem thanks.