-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for HTC passthrough #151
Conversation
e003189
to
e60dd4e
Compare
common/src/main/cpp/extensions/openxr_fb_passthrough_extension_wrapper.cpp
Outdated
Show resolved
Hide resolved
e60dd4e
to
eae51ac
Compare
common/src/main/cpp/include/extensions/openxr_htc_passthrough_extension_wrapper.h
Outdated
Show resolved
Hide resolved
common/src/main/cpp/extensions/openxr_htc_passthrough_extension_wrapper.cpp
Outdated
Show resolved
Hide resolved
common/src/main/cpp/extensions/openxr_htc_passthrough_extension_wrapper.cpp
Outdated
Show resolved
Hide resolved
common/src/main/cpp/extensions/openxr_htc_passthrough_extension_wrapper.cpp
Outdated
Show resolved
Hide resolved
common/src/main/cpp/extensions/openxr_htc_passthrough_extension_wrapper.cpp
Outdated
Show resolved
Hide resolved
eae51ac
to
bb0b3c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested on the HTC Vive XR Elite and it worked fine! The code changes look good to me as well. Great work!
Looks like this needs a rebase on conflicts in |
Co-authored-by: seichter
bb0b3c5
to
044deef
Compare
This PR adds support for HTCs version of passthrough in a way that is transparent to the user.
Here we also react to our blend mode.
I did have to add some extra checks to the Meta implementation because while the HTC implementation became active, Metas implementation wasn't checking whether it was actually active and just started error spamming as a result :P
Note that there is an interesting difference here as well, while Meta explicitly requires us to start and stop passthrough, HTC doesn't. We do need to create a passthrough handle once the session is setup, but from then on passthrough is purely switched on whether the passthrough composition layer is added.
I am making the assumption here, and I think that's a fairly safe assumption, that no device is going to support both Metas and HTCs passthrough extensions. If this does become an issue we may need to do something like
set_emulate_environment_blend_mode_alpha_blend
returning an error when another extension has already claimed it.Tested this on my HTC Elite XR and seems to work fine.
Note, thanks to @seichter (PR godotengine/godot#86407) for doing much of the ground work. Made it really easy to implement this in the vendor plugin.