• Hi Guest!

    This is a notice regarding recent upgrades to the Hub. Over the last month, we have added several new features to improve your experience.
    You can check out the details in our official announcement!

2.X Suggestion: Use OpenXR instead of OpenVR

pchaos

New member
Messages
1
Reactions
4
Points
1
Why?
 
Old thread, but here is another advantage of OpenXR in newest unity engine:
OpenXR allows to set an alpha-channel for the rendering pipeline, so that the HMD driver receives a rendered picture with not only RGB but also Alpha, which says how transparent the pixel is. The HMD driver can then mix in a camera feed in the background, resulting in a perfect passthrough effect. No more greenscreen hacks necessary. Objects can then be set as 100% transparent and will be perfectly removed in the passthrough, anti-aliasing will no longer produce artifacts like with greenscreens and chroma keying.
The rendering layer just has to enable the XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT bit and the texture needs to have an alpha channel.
Here is such a plugin that does exactly that: https://github.com/Rectus/openxr-steamvr-passthrough It supports chroma keying and alpha blending mode, although right now it can only grab the camera feed from SteamVR.
Also OpenVR will be obsolete in the future and someday Steam will only support OpenXR.
 
Last edited:
Back
Top Bottom