Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
EudenOne's avatar
EudenOne
Explorer
10 months ago
Solved

How to render UI over 3D mesh and controllers on top of UI

What I want is for the UI to be visible over all 3D geometry (ignoring depth) BUT at the same time have the line-casts and the controllers visible over that UI. [ UI Panel ] | [3D World Mesh] | o-...
  • EudenOne's avatar
    10 months ago

    SOLVED:

    Using Unity URP Render Features:

    • Add Render Objects to the features
    • Event: After Rendering Transparent; Queue: transparent; Layer: <one layer, mine called Overlay UI>
    • In Overrides: Mode: None; Depth Test: Disabled 
    • Set on OVROverlay Canvas: Overlay type: Underlay; Opacity: Transparent
    • Finally, the interactor rays must be on the defined layer and with a transparent material.

    And that's it, the important bits are in bold. Now the UI renders above any 3D mesh, and the pointer also are above the UI and any other mesh, all that without the performance hit of rendering twice via stack camera.