Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What is the specific effect of enabling/disabling "Use HDR" in Project Settings Graphics Tiers?

Discussion in 'General Graphics' started by starform-joshrosen, Mar 27, 2019.

  1. starform-joshrosen

    starform-joshrosen

    Joined:
    Aug 29, 2018
    Posts:
    8
    I would like to understand which parts of the build process are impacted by this change.

    Does it effect shader compilation when building players and asset bundles?

    Is it simply a setting that changes code paths at runtime?

    Does having it enabled, but then not actually using HDR at runtime negatively impact performance?

    Does it change the default framebuffer format?

    Similarly, what does changing the HDR format do (again, in terms of where in the build process the difference takes affect)?

    Thanks!
     

    Attached Files:

  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    Maybe? Some shaders do have HDR and non HDR variants. Mainly deferred shaders, so checking it off may allow Unity to strip those shader variants. Might strip them for other reasons too, so it might not change anything for your project.

    Need more detail about what you’re trying to ask.

    No.

    No, and yes. For a camera set to allow HDR it changes its default frame buffer format from
    RenderTextureFormat.Default to DefaultHDR (which in turn is defined in the settings).

    Nothing, apart from that setting changing the DefaultHDR format, and thus what format HDR cameras and render textures created with that format use.



    When HDR is enabled it means HDR cameras render to a higher bit depth render buffer than the default ARGB32 (usually ARGBHalf, unless modified in the settings), a shader keyword is enabled which may cause some shaders to use a different variant, and the post processing stack will switch to using the same format if it and the camera rendering is in HDR mode.