Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ItsVirtuallyJason's avatar
4 years ago

OVROverlay always displays on top on Quest 2

I'm trying to use OVROverlay to render some text in a scene clearly. I've got it working, but it has different behavior on Quest 2 vs PCVR. On the former, it's always on top. On the latter, it's in the proper depth but you can make it the other way by turning off Shared Depth Buffer in PC XR settings or checking No Depth Buffer Testing on the OVROverlay script.

 

I'm wondering if there's something the Quest just doesn't support to make it work with the proper depth. There's no similar setting I can find like Shared Depth Buffer for Quest/Android. As far as I could tell, it seems GL_OES_depth_texture extension is what's needed to support that, and when the app runs it seems to report GL_OES_depth_texture as being on. Trying to figure out if there's some way to get it to work like it does on PCVR but coming up with nothing. Maybe Quest really doesn't support it for performance reasons but it's hard to tell.

7 Replies

  • I did wind up making this work with the punch through method. But I'm still interested in why it's working one way on PCVR and not on the other.

    • gpiffaretti's avatar
      gpiffaretti
      Honored Guest

      I'm facing this very same problem. Not sure why I can't select a shared depth buffer. How did you manage to make this work?

  • Where you using URP?  I can't seem to get an OVROverlay set to Underlay to work.  I've got a converted shader that I think is correct, I've also tried a standard UI/Transparent shader, but with it on a Layer that uses the URP Renderer's Render Objects feature to render it right after rendering all opaques.  But nothing seems to properly punch a hole.  (my content will show up if I stop rendering everything else though, or on top of everything if I set it to Overlay.)