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. Dismiss Notice

[BUG] URP Camera Stacking Post Processing

Discussion in 'Universal Render Pipeline' started by RogueStargun, Jun 29, 2020.

  1. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    Oculus Quest
    Unity 2019.4.0f1
    Oculus XR Plugin 1.3.4
    XR Plugin Management 3.2.12
    Universal RP 7.3.1

    Using Editor Windows 10 Direct X 11

    According to the docs, multipass rendering does not work with camera stacking, but single pass will.

    I can confirm that when URP post processing is enabled with XR single pass (on the Oculus Quest), the overlay on the left eye is greyed out (the overlay appears but the base camera does not. The right eye works fine.

    Disabling post-processing on the base camera makes everything work fine. The greying only occurs with post processing enabled.

    (PS: Unity should throw an error when multipass is enabled rather than just not work??)
     
  2. Shaunyowns

    Shaunyowns

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    328
  3. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    I've filed two bug reports as there is a second bug I discovered.

    The overlay camera render does not appear at all when I build the project on the Oculus Quest (ie: the android build is missing the cockpit in my vr game. All cockpit elements are invisible).

    I've included the entire project in my bug report, and I'm leaving this message here for folks who ran into the same problem.
     
  4. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    I should also mention that I am using OpenGLES3 (default graphics api).
    I will try with Vulkan to see what happens.
     
  5. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    Switching to vulkan does not fix this : (
    I know camera stacking is a new feature. I am praying that by the time I finish the game that it will be fixed for the Oculus Quest.
     
  6. ThomasZeng

    ThomasZeng

    Unity Technologies

    Joined:
    Jun 24, 2019
    Posts:
    78
    Hi @larrydu88
    Could you post the case number here so that we can followup?
     
  7. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    Case 1260585
     
  8. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    Also, when I build the project for android for the oculus quest, the cockpit (overlay layer) disappears completely
     
  9. ThomasZeng

    ThomasZeng

    Unity Technologies

    Joined:
    Jun 24, 2019
    Posts:
    78
    Thank you @larrydu88 !
    We will get back to you on this soon!

    Regards,
    Thomas
     
  10. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    Ok I realized one of the issues I posted has a simple solution as recommended by Unity customer support. It was just difficult to dig up this setting.

    Project Settings >> XR Plug-in Management >> Oculus >> ANDROID >> Stereo Rendering Mode == Multiview

    The URP docs are clear about "Single Pass Instanced" working for Windows, but are less clear that "Multiview" works for Android, but "Multipass" does not.

    For VR noobs like myself who do not know the difference, it may be beneficial to update the docs to describe this (or at least throw an error if attempting to build with "Multipass" rendering on android.



    The problem with the grayed out left eye when using post-processing is a genuine bug however.
     
    FlightOfOne likes this.
  11. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    659
    @ThomasZeng
    It definitely is a bug, not sure if I should open a bug report too since there is one already, but I am having the same exact problem in PC.
     
  12. ThomasZeng

    ThomasZeng

    Unity Technologies

    Joined:
    Jun 24, 2019
    Posts:
    78
    Hello @larrydu88

    I took a look at repro project today and was able to confirm the overlay camera issue you run into is caused by the stereo mode.
    In 19.4, only SPI and Multiview stereo modes are compatible with URP camera stacking.
    Glad you were able to figure it out already!

    Thanks,
    Thomas
     
  13. ThomasZeng

    ThomasZeng

    Unity Technologies

    Joined:
    Jun 24, 2019
    Posts:
    78
    @FlightOfOne
    I can confirm that I was able to repro this postFx bug. I have forwarded the bug to the right people to have a look!

    Thanks,
    Thomas
     
    FlightOfOne likes this.
  14. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    Any updates on the status of this bug?

    Here's some footage of my game, and the lack of postFx is quite disappointing.
     
    FlightOfOne likes this.
  15. Shaunyowns

    Shaunyowns

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    328
    Hey there!

    I chased down the case and it appears the status went over to GitHub here: https://github.com/Unity-Technologies/Graphics/pull/1274

    Let me know if this is useful!
     
  16. budwheizzah99

    budwheizzah99

    Joined:
    Apr 4, 2014
    Posts:
    4
    This is not useful. You've posted a link to a conversation about a commit that was never merged into URP.
    It's been sitting there since the end of July and the available URP 8.2.0 package still has this complete show-stopping bug.

    Is this going to get fixed before 2032 when future holographic AR is in its fifth generation and URP is at version one quadrillion?!

    We need a fix for this abysmal bug. I get that URP was meant to be helpful, but right now it's borderline unusable and for VR it's an absolute no-go because of obvious bugs like this that get put off and ignored.

    The Multiview setting is not available in Windows settings and Multi-pass is out of the question with URP as it kills camera stacking (Unless you have a whole project without UI layers), so this is still very much broken. This needs to work with SPI which it does not.

    PS: This issue affects all VR headsets... it's not an Android thing. I'm getting the problem on a Quest while running through Link, which behaves just like any PC-based ehadset would.
     
    Last edited: Oct 1, 2020
    FlightOfOne likes this.
  17. Shaunyowns

    Shaunyowns

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    328
    That's fair, I'll push this post over for you to see what I can get back!
     
  18. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    659
    We really do need a fix soon though, it has been broken for a very long time.

    @budwheizzah99 I have been checking the post processing checkbox on the last (last drawn layer) camera (I also use camera stacking). This is not perfect but as a workaround, but this is what I have been doing. But if you have multiple PP volumes, e.g. one for UI another for objects, this can cause undesired issues.
     
  19. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    I was actually ok with switching PostFx off because of the oculus quest limitations, but then FB went and both announced and released the Quest 2 within the timespan between identifying and fixing this bug!
     
  20. hgulgen

    hgulgen

    Joined:
    Nov 29, 2016
    Posts:
    50
    Unity 2019.4.12 and URP 7.3.1 still broken for vr. It gives black screen or blurry color screen in oculus screen. If I switch off Post process from Camera , I can see normal . This is only way to solve for now.
     
  21. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    659
    I just upgraded my URP to 7.5.1 and I can confirm the Postprocessing problem is now fixed and everything works great.
     
  22. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    Ok, checking back in after many months, and I should mention that this bug was never properly fixed.

    I upgraded to URP 7.5.1, and I should note that
    Post-processing works in the base camera layer only, and will disable camera stacking in the right eye if the overlay camera has post-processing enabled.
    When post processing is activated on overlay cameras, the right eye will disable the overlay camera entirely.
     
  23. stychu

    stychu

    Joined:
    May 9, 2016
    Posts:
    62
    Whats the state on this. Is it fixed. ?
     
  24. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
  25. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    140
    Trying to solve the same issue - have a quad in world-space with a video playing, and I don't want post-processing on the screen of course. Using camera stacking and ignoring post-processing on the overlay camera works fine in the editor, but once build to the Quest 2 the screen is gone....
     
  26. raydentek

    raydentek

    Joined:
    Jul 27, 2016
    Posts:
    103
    I am developing for Quest as well, but encountering numerous numerous issues with graphics pipelines. It's such a pain to read all the people having trouble with such fundamental issues of an engine. The whole URP push is nonsense. So far I've put the project back into Built-in pipeline, bought an asset called Next gen Soft-Shadows to fix the terrible unfiltered shadows unity has since version 2 I was on back in 2007. Turned off any postprocessing. Turned on FFR and Multiview (single pass) rendering. Now I'm getting 72 fps on an empty scene. Hope things will improve on this whole matter.
     
  27. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    I'm going to have to chime in and mention that this problem was never definitively fixed. As of may 2021, URP still has camera stacking issues if particularly if certain layers have things like post processing enabled. Since it's been a year, I will start a new post with a new case ticket
     
  28. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    659
    Out of curiosity, are you using 2020.x?
     
  29. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    2019.4.14f
     
  30. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    Last edited: May 25, 2021
  31. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    286
    After reading the github link above a bit more closely, I see that
    THIS ISSUE IS FIXED IN UNITY 2020.3.9f1/URP10.5.0
    Thanks Unity!
    This issue is closed. Upgrade Unity
     
  32. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    659
    I was going to say, try 2020. After upgrading to 2020 and urp 10, a lot of my problems went away and performance improved. Let's just hope nothing new breaks!