Search Unity

(LWRP) UI not displayed on Oculus Quest

Discussion in 'Universal Render Pipeline' started by JL_Tech_BBW, Jun 20, 2019.

  1. JL_Tech_BBW

    JL_Tech_BBW

    Joined:
    Jun 22, 2017
    Posts:
    32
    Hi there,

    I'm actually working with our new Oculus Quest and the last version of LWRP (5.16.1),
    and when I build (Android) on the headset, the UI are not displayed.

    I tested many different settings and camera setup but the result is always the same.
    (One single camera or Oculus Setup)

    Is that a bug with LWRP or with the Oculus Quest ?
     
  2. JL_Tech_BBW

    JL_Tech_BBW

    Joined:
    Jun 22, 2017
    Posts:
    32
    (Up) Nobody ? This is really weird.
     
  3. bothwell

    bothwell

    Joined:
    Jun 17, 2019
    Posts:
    1
    Is your UI in world space?
     
  4. JL_Tech_BBW

    JL_Tech_BBW

    Joined:
    Jun 22, 2017
    Posts:
    32
    Yes, my UI's are in World Space canvas.
    What is weird, is that it is working fine with LWRP with cardboard devices but not with Oculus Quest.
     
  5. tobermanar

    tobermanar

    Joined:
    Aug 17, 2016
    Posts:
    9
    In my opinion it can be either too small or too big of not in the correct position.

    Did you put your UI under "CenterEyeAnchor" ? Does it work correctly in editor ?

    Can you give us more detailed informations ? I used worldspace UI in Quest and it's perfectly working for now.
     
  6. DarkVerse

    DarkVerse

    Joined:
    Jan 9, 2017
    Posts:
    57
    I am seeing the same thing but I am using GVR Cardboard and only on some devices, and I am not using LWRP but builtin. A Samsung S7 is fine but on a Pixel the UI is missing. I am using OpenGL as the graphics API (with Vulkan the UI appears but there are other issues with Vulkan). I think whatever the problem is it seems to affect World Space canvases but only occurs on some devices and perhaps not dependent on rendering pipeline. It still responds to reticle over events and click, just isn't rendered. Very weird.
     
  7. JL_Tech_BBW

    JL_Tech_BBW

    Joined:
    Jun 22, 2017
    Posts:
    32
    I still have the problem with Unity 2019.2 and LWRP 6.9.1.
    FYI, I'm using CurvedUI to do curved GUI.
     
  8. JL_Tech_BBW

    JL_Tech_BBW

    Joined:
    Jun 22, 2017
    Posts:
    32
    After some more investigation, it seems to be the Opaque Texture from the LWRP SRP that break the UI rendering.
    I tried all kinds of things with a blank projects and tried to reproduced in my main project.

    The UI were there at the beginning of my test project and then I enabled the Opaque Texture in the LWRP asset and suddenly the GUI where gone from my builds.
     
  9. AzurySimon

    AzurySimon

    Joined:
    Jul 16, 2018
    Posts:
    38
    I am having the same issue. As soon as I enable 'Opaque Texture' in the LWRP pipeline asset all transparent objects, both UI components and any other objects with a transparent shader, become invisible. This does not happen in the editor, only after building and running on Oculus Quest.
     
  10. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Don't seem to be getting this on 2019.3 beta versions, using Universal render pipeline, do you have more info about this?
     
  11. AzurySimon

    AzurySimon

    Joined:
    Jul 16, 2018
    Posts:
    38
    Unfortunately I can not tell you much more.
    I had at one point added a custom SciptableRenderFeature with a similar purpose I am now trying to solve using the Opaque Texture (create a texture from the current camera to be used later in transparent shaders). As long as that feature was enabled any UI and transparent objects would either be gone completely or be serverly glitched. It looked like there was some error in the depth buffer causing transparent elements to 'think' they were behind opaque objects and either not draw at all or only partially. I looks to me like something similar is happening with the opaque texture feature.

    I will try to post a screenshot of this tomorrow when I have the time to work on this again!
     
  12. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I would be interested to see this myself as i cannot reproduce it!
     
  13. AzurySimon

    AzurySimon

    Joined:
    Jul 16, 2018
    Posts:
    38
    This is what it is supposed to look like:
    editor.jpg
    This is from the editor, it looks the same on the quest as long as neither 'Opaque Texture' nor my custom Feature are not active.
    There is a world space UI and a transparent hand model holding the controller.

    This is what it looks like with 'Opaque Texture' active:
    opaque.jpg
    As you can see both the UI and the transparent hand model are gone. The menu is still there, I can interact with it. Apart from the 'Opaque Texture' nothing else was changed.

    This is what it looks like with my custom pass:
    customfeaturepass.jpg
    Here part of the UI is cut off, while part of my controller model gets this jagged edge as soon as I hold it in front of the UI.
    The cut off part of the UI looks similar to parts of my scene, in this case the small step in front of the player. This 'masking' is fixed to my view direction, almost as if it was somehow 'baked' when starting the application. This 'masking' also 'updates' when I go to the Quests main menu and reopen the application, ie. looks different every time.

    I am using 2019.2.4f and LWRP 6.9.1

    Disclaimer: the individual pictures you see in the screenshots are not mine.

    Edit: My custom pass works very similar to the blurry refractions example from here: https://github.com/UnityTechnologies/LWRPScriptableRenderPass_ExampleLibrary
    Its purpose is to create a grabpass like texture to be used in other shaders.
    Also I am not seeing anything in the Quests adb logcat indicating what went wrong.
     
    Last edited: Sep 18, 2019
  14. AzurySimon

    AzurySimon

    Joined:
    Jul 16, 2018
    Posts:
    38
    I just tested this on a new project using the 'VR Lightweight RP' template, same result. Using the opaque texture option in the LWRP asset causes all transparent objects to disappear.
     
  15. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Right, there are some bugs with that template, I would not use it as they have pulled it due to depth buffer and opacify issues. It is currently being worked on for UniversalRP but no confirmed eta on release
     
  16. AzurySimon

    AzurySimon

    Joined:
    Jul 16, 2018
    Posts:
    38
    Good to hear! Is there anything we can do in the meantime to fix that issue ourselves?
     
  17. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Use the latest version of the Universal render pipeline/unity editor at least 2019.3, i i could not produce your issues there and also the VR template won't be back until it is finished. When the VR template is back you can just copy the render pipeline from the VR template into your project.
     
  18. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I take back what I said actually! Just used URP 7.1.2 today and the UI didn't render in game despite it looking fine in editor and using 'Mock HMD' too :(
     
  19. Indiefreaks

    Indiefreaks

    Joined:
    Nov 12, 2012
    Posts:
    89
    I actually have something "similarish" to what your experiencing...
    If you look in the thread I started a few days ago, I'm having some trouble when trying to render the UI reflection on a build or in Editor with the game window maximised.
    https://forum.unity.com/threads/lwr...nly-working-if-sceneview-is-displayed.752048/

    Do you happen to see the same UI not rendering issue when maximizing the game window in editor?
    If so, then maybe we found some weird rendering order in the UI related to it? :)
     
  20. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I have reported a repro project to Unity through the bug reporter so hopefully they look into it
     
  21. tomszirtes

    tomszirtes

    Joined:
    Apr 25, 2013
    Posts:
    20
    I can confirm I had the same issue Unity 2019.2.21f1, LWRP. Switching off Opaque Texture bring back UI elements.
    So thanks for finding that!

    I'm in a bit in despair the state of Oculus Quest + Unity - I wish they could get their collective acts together. Really basic things seem to be completely broken. I've wasted over a day on trying to find some combination of Unity / LWRP (or URP) and Oculus Quest to work nicely. Grumble over... :)

    To save anyone else some time these are my findings:

    Unity 2019.2.21
    LWRP + GLES 3 + Singlepass = just has a tiny window in a black void
    LWRP + GLES 3 + Multipass = only appears in one eye
    LWRP + GLES 3 + Multiview = works - only if you disable Opaque Textures in LWRP settings otherwise no UI.

    Unity 2019.3.3f1
    URP + Multiview + Camera with XR Legacy Package = flickering Unity logo after splash nothing
    URP + OVR v13 using OVRCameraRig = One eye okay, right eye not tracking properly broken.
     
  22. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    310
    Gotta resurrect this thread I guess...

    Unity 2019.4.9f1, URP 7.5.1, XR Plugin 3.2.16: MSAA no longer works in editor unless I check Opaque Texture, which in turn makes UI not render on Quest. Unchecking Opaque Texture makes UI render again on Quest, but breaks MSAA in the editor.
    Everything was fine before I upgraded URP from 7.3.1 I believe.

    My game is Quest only so this is not causing particular issues, but it's quite the annoyance since I test the game in editor a lot.
     
    AzurySimon, Roel03 and ROBYER1 like this.
  23. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    310
    Update: bug still present in latest LTS versions and in 2020.2 beta as well. I'm running some experiments but same results, as soon as I compile with Opaque Texture on, UI is a glitchy mess, transparent shaders are invisible, and in 2020.2 I'm also getting incredibly low framerate.

    On the other hand, latest LTS version doesn't seem to have MSAA issues anymore.
     
  24. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I was rallying to get those MSAA issues fixed so glad you noticed they were fixed too. What URP version are you on? I was forced to move to URP 9 from 8, then found out 9 wasn't going to get a release version so had to move to 10 because or many bugs I can't even list here. Sadly, for 10 we needed to move to 2020.2 as far as I can remember and had issues on Quest Android builds with load times so had to backport quickly to URP 9 on 2020.1 and stomach some terrain detail mesh/depth map issues on PC VR builds for now.
     
  25. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    310
    I'm using URP 7.5.1 with LTS 2019.4.16. Kinda happy with LTS right now, everything seems to work as expected, except for the Opaque Texture issue which really makes me eat my heart out. Aside from the invisible UI, it bugs me that I can't use shaders that take advantage of it. I wonder if this will ever be fixed, or if it is some wrong configuration I have in my project...
     
  26. AzurySimon

    AzurySimon

    Joined:
    Jul 16, 2018
    Posts:
    38
    Also still having the same problem, now using 2020.1.1 and URP 9.
    Not sure if any versions in between ever worked, I never really bothered after posting here due to the inherent performance issues on mobile devices. Wanted to try again, this time with Quest 2 instead of 1.
    I am amazed this issue still exists..
     
  27. TheVladLad

    TheVladLad

    Joined:
    Aug 9, 2019
    Posts:
    2
    I also experience the same issue, using 2020.3.20f1 LTS and URP 10.6.0. My UI and transparent shaders disappear when I enable Opaque Texture, only when I build to Oculus Quest 2 and not in Editor.

    When will this be fixed? I would like my shaders to work properly without breaking all my UI.
     
    ROBYER1 likes this.
  28. killiannhervagault

    killiannhervagault

    Joined:
    Jun 18, 2021
    Posts:
    1
    Got the same issue when building for the Quest 2, only happens if the ui is far enough from XR Camera. Tested on Unity 2020.3.18f1, Texture Compression is ASTC, URP version is 10.6.0.
     
  29. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    I've never had this issue before on Unity 2021.1.28 with URP 11 but I just upgraded to 2021.3.0 URP12 and am getting this for the first time.

    I feel given the period of time this error has been occuring it must be some fringe case. Anyone found a solution?
     
  30. Toshiza

    Toshiza

    Joined:
    Jul 9, 2017
    Posts:
    2
    Also occurs at URP12
    Unity2021.3.19f1
    Disabling "Opaque Texture" solves the problem.
    But when will this bug be fixed?
     
    AzurySimon likes this.
  31. quadro5567

    quadro5567

    Joined:
    Feb 23, 2022
    Posts:
    4
    i am in unity 2021.3.28LTS, update the oculus integration and XR package, but still cant render UI when using MSAA with opengles3 graphics API, can confirm you can fix it by disabling opaque textures, but this is just work around, cant believe this issue still exists, and using vulkan have bad performance (already turned off the graphics jobs)