OVROverlay hides controller models — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

OVROverlay hides controller models

AndyDeveloperAndyDeveloper Posts: 2
edited May 30 in Unity Development
HI all,  I am attempting to build a UI using OVROverlay in Unity.  It looks great BUT on mobile the overlay renders in front of any scene geometry, thus occluding the controller models and pointer rays.  The same behavior can be observed in the OVROverlay scene in SampleFramework. A message in Player Settings indicates that the shared depth buffer is not available on mobile, so I am thinking it might be a limitation.
However, the Oculus Home scene and video player apps don't have this issue. 

Any ideas?


  • MikeSwansonMikeSwanson Posts: 38
    Brain Burst
    You need to configure the OVROverlay as an underlay. See: https://developer.oculus.com/documentation/unity/latest/concepts/unity-ovroverlay/
  • AndyDeveloperAndyDeveloper Posts: 2
    edited June 2
    Thanks Mike, it worked!!   I set the OVROverlay as an underlay, and added a quad with the Impostor shader to "punch a hole" in the eye buffer.
    Unfortunately my overlay is dynamic, translucent, and has irregular edges. I tweaked the Impostor shader to handle the texture's alpha, but the edges flicker a lot. This doesn't happen in overlay mode, perhaps because it's getting the alpha from a clearer texture. 
  • yesbirdyesbird Posts: 17
    edited June 14
    Hi guys !

    I am trying to do the same thing but can not figure out how to do it.

    Doc says: "Use the Underlay Imposter.shader (VR/Resources) on your to draw imposters in the delta space after all opaque textures are drawn, but before the alpha."

    The questions are: 
    1. What object should use "Underlay Imposter.shader" ? I am using special toon shader for all my objects in scene, should I switch them to  "Underlay Imposter" ?

    2. How to implement "after all opaque textures are drawn, but before the alpha." What is the method to controls this order ?

    Please, provide more details or point to appropriate information source. Any working Unity example could help a lot also.
    Thanks in advance.

Sign In or Register to comment.