IanPhilips / UnityOculusAndroidVRBrowser

3D browser based on GeckoView and Oculus SDK for Unity projects built on Android (Oculus Go/Quest, maybe GearVR)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decouple from OVROverlay

NoviaDroid opened this issue · comments

The webview is rendered by OVROverlay, and it will always render in front of everything else (overlay is in front of eye texture)

So when converted the scene to use controllers input instead of gaze, the controller is always looks behind the webview, and looks wired.

And because this is based on oculus sdk, it is hard to use in other mobile vr platforms such as daydream and pico.

Maybe there is a way to get rid of oculus sdk?

You can use other OVROverlays (up to 15) to render over the browser's.

With respect to the sdk: #8 (comment)

Yes,but it will be wired if render a controller as a overlay? It would be 3D look -> 2D look? I haven't tried it yet.

mmm yeah true, I believe the OVROverlays can have other shapes than quads at least but not sure which.

You can also use a OVROverlay with the Current Overlay Type set to Underlay. This will render under everything which means you will not see it, but there is a built in shader to punch through the screen to show the underlay. The result is the OVROverlay functions just like if the Geckoview was rendered to a texture on a quad.

https://developer.oculus.com/documentation/unity/unity-ovroverlay/?locale=en_US

If that works that would be excellent! Thanks for the tip. Hopefully the punched hole in the screen still allows other things closer to the cameras to be seen.

It does work. I am currently using that in my project and you can't tell that it isn't a a quad with a texture.

Beautiful, it seems like the demo should have separate underlay and overlay scenes. If you configure it in an "underlay" scene and submit a PR I'd be grateful. Alternatively you could detail the steps in the README and submit a PR.

Submitted pull request. Several files files changed automatically even when opened with the correct version of Unity. Hopefully that doesn't mess anything up.

Nice work! I just confirmed things are working correctly, thanks!