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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Bug Can't enable HDR when in VR

Discussion in 'Universal Render Pipeline' started by Wasplay, Dec 13, 2020.

  1. Wasplay

    Wasplay

    Joined:
    Jun 2, 2018
    Posts:
    46
    It seems like HDR has been disabled when playing in VR with the URP.
    HDR works perfectly until I put my head in my Quest 2, then the scene view will still use HDR but the game view won't.
    My game heavily uses bloom so I need HDR, what can I do to fix this ?
    Thanks
     
  2. RyanKeable

    RyanKeable

    Joined:
    Oct 16, 2013
    Posts:
    62
    HDR can work in VR on the quest 2 but it comes with several complications. Not knowing the specifics of your set up I cannot tell you why HDR is not working on your headset.

    What I can tell you is:

    1. As far as I am aware, any renderer using HDR floating point colours will not be correctly solved for MSAA so those objects will appear jaggedy.
    2. As soon as you enable HDR, you are no longer rendering your passes to the swap chain texture on the Quest's and this will have performance impacts
    3. Rendering bloom is costly so you will need to find optimizations elsewhere if you do not have the overhead for it
    4. Using Scriptable Render Passes and Features will automatically incur a final blit pass (1ms)
    If anyone has solutions to solving MSAA on HDR rendered objects I am all ears as I have no been able to soilve this.

    These are a couple of key reads:

    https://developer.oculus.com/blog/h...derdoc-quest-hardware-and-software-offerings/

    https://developer.oculus.com/blog/h...os-and-optimization-tips-part-1/?locale=en_GB
     
    Sara_01 and BOXOPHOBIC like this.
  3. Wasplay

    Wasplay

    Joined:
    Jun 2, 2018
    Posts:
    46
    Well look at this :


    As soon as I enable VR, the HDR gets disabled in the game view.
    There's definitely something wrong
     
  4. gurun_x

    gurun_x

    Joined:
    Jan 11, 2021
    Posts:
    1
    Ok, I had the same problem with my Quest 2 setup, and just couldn't get HDR to kick in when running on the PC. I noticed OVR manager was complaining about me using 4x MSAA, and it automatically changed it to 2x during startup. Since I didn't want that I disabled it, and then suddenly all my other settings kicked in. So make sure that "Use Recommended MSAA Level" is disabled and see if that works.

    upload_2021-1-11_18-47-13.png
     
  5. Noors84

    Noors84

    Joined:
    Jul 12, 2016
    Posts:
    77
    Same issue here, URP, using Oculus Link. HDR seams deactivated in play mode so bloom doesn't work correctly.
    It's a big issue.
     
    Last edited: Jan 27, 2021
  6. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    219
    Works with 7.1.3 (verified). I'm assuming, fiddling around with bloom and hdr in 7.5.2 breaked something. I filed a case
    EDIT: case 1311161
     
    Last edited: Feb 1, 2021
  7. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    AFAIK MSAA and HDR are incompatible at the engine level because it'll look really bad without making the engine slower than it should be. It can be done but then there's a lot of other issues. If you're targeting desktop you could use FXAA or other.

    You should see something like the MSAA pixels get missed or are too bright if you can get MSAA working, say URP + custom tweaks.

    Unity has written stuff about this in their docs, if you can find them :/
     
  8. TheBiy93

    TheBiy93

    Joined:
    Oct 9, 2017
    Posts:
    4
    I had to drop mine from 7.5.2 to 7.3.1 to get it working!
     
  9. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    219
    Got a reply back:
    Hi,

    We successfully reproduced this issue. It will be possible to follow the progress on a chosen resolution in our public Issue Tracker once the report has been processed (this might take up to an hour):
    https://issuetracker.unity3d.com/product/unity/issues/guid/1311161

    I will request a backport for 2019.4 and URP 7.x.x. However, it is doubtful it will be accepted because fixes in URP 7 are challenging with respect to XR; quite a few things have improved from 2019 LTS and URP 7, and upgrading is the recommended path.

    We highly appreciate your contribution. If you have further questions, please feel free to contact us.

    Best regards,

    Really don't know what to say now. First they claim "use the LTS branch, it's stable and reliable for at least a few years". That was the deal so it was okay for me they threw out the old VR settings in 2020.1, replacing it with this unspeakable clumsy XR Management, making it almost impossible to upgrade VR projects easily.

    And now they start breaking stuff in the LTS branch, which worked before and claim "just upgrade to the more unstable version" ??? What the actual F***??!
     
    Fewes, Wasplay and PrimalCoder like this.
  10. LeFx_Tom

    LeFx_Tom

    Joined:
    Jan 18, 2013
    Posts:
    88
    Unfortunately, this is the new way for a while now. Broken promises and horrible communication. The whole XR development is....in a questionable state.
    It's also funny to suggest you move into a tech-release, as the 2020-LTS is still miles out.
    Completely defeats the purpose of LTS in itself. I know why i still don't upgrade my projects from built-in to URP...at least mine is "bug-stable" so far...
     
  11. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    257
    I just spent two whole days downgrading my project to 2019.4 LTS because of severe performance regression on newer versions of URP, and now I find myself in the same situation where HDR is completely broken in VR (OpenVR, tried both the now deprecated native plugin + XR manager). My project was running 2019 a few months ago with HDR+MSAA without problems and I would assume LTS would be the absolute best choice for a major engine version. That reply on the bug report reads like some sort of practical joke: "LTS is the stable choice for production. Oh it's broken? Well the latest version has the fix, never mind any other problems it might have which is the reason we even have LTS in the first place".

    Downgrading to URP 7.5.1 fixed it for me, so it would seem some change in 7.5.2 is the culprit
     
    Last edited: Mar 17, 2021
  12. loganstalwart

    loganstalwart

    Joined:
    Feb 28, 2018
    Posts:
    3
  13. loganstalwart

    loganstalwart

    Joined:
    Feb 28, 2018
    Posts:
    3
    Looks like URP v7.6.0 clears up the XR HDR issue for 2019.4.x
     
  14. uncuratedmail

    uncuratedmail

    Joined:
    Aug 19, 2019
    Posts:
    2
    Does HDR works with Legacy render pipeline? If anyone has tested please let me know
     
  15. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Probably not well if using MSAA.
     
  16. RyanKeable

    RyanKeable

    Joined:
    Oct 16, 2013
    Posts:
    62
    I had success rendering bloom in VR using Unity 2019.4.20f1 and URP 7.3.1 while maintaining use of MSAA.

    We were able to solve a number of performance and other aliasing issues which I cover here: https://www.artstation.com/mulletdulla/blog

    If you have any questions let me know!
     
  17. Oducceu

    Oducceu

    Joined:
    Aug 13, 2013
    Posts:
    2
    Nope (
     
  18. StudioZ7

    StudioZ7

    Joined:
    Nov 13, 2021
    Posts:
    10
    Fix (for bloom effect, for example, to work in URP):
    I am deploying to Quest 2 and my solution, after several tries is this (see attached).
    After changing the quality in URP for high AND changing the quality settings for android, it worked. Then I realized that, after making millions of changes, not changing in the quality settings simply would never make any difference. Just remember this.
     

    Attached Files: