MozillaReality / FirefoxRealityPC

INACTIVE - Firefox Reality for PC-connected VR platforms
https://mixedreality.mozilla.org/FirefoxRealityPC/
Other
22 stars 14 forks source link

When in 2D mode, use an OpenVR overlay for the browser window #128

Closed philip-lamb closed 3 years ago

philip-lamb commented 4 years ago

In order to make use of OpenVR protected overlays as a destination for EME media, we need to support rendering the browser texture to an OpenVR overlay (and have OpenVR composite it into the scene) instead of having Unity composite it. This will also potentially be a performance improvement.

Tasks will include:

patrickoshaughnessey commented 4 years ago

I made good progress on this one this week. The current state can be found on the steamvr-overlay branch (https://github.com/MozillaReality/FirefoxRealityPC/tree/steamvr-overlay). Many thanks to @thomasmo and @kearwood for their assistance!

The current progress is:

Known limitations:

philip-lamb commented 4 years ago

Valves docs imply that it ought to be possible to get correct depth sorting, but I'm not sure of the exact mechanism. I wonder if we there is a way to deal with the occlusion problem via a "two-pass plus scissor"-technique where the overlay is drawn first, and then the immersive scene second, with the areas of the overlay that aren't occluded by the hands/laserpointer etc left undrawn. This would suggest that we'd have to have the immersive scene render onto a transparent frame buffer.