Skip to content
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

Merged
merged 1 commit into from
May 30, 2024

Conversation

BastiaanOlij
Copy link
Member

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.

@BastiaanOlij BastiaanOlij added the enhancement New feature or request label May 16, 2024
@BastiaanOlij BastiaanOlij added this to the 3.0.0 milestone May 16, 2024
@BastiaanOlij BastiaanOlij self-assigned this May 16, 2024
@BastiaanOlij BastiaanOlij force-pushed the add_htc_passthrough branch 3 times, most recently from e003189 to e60dd4e Compare May 16, 2024 08:19
@BastiaanOlij BastiaanOlij force-pushed the add_htc_passthrough branch from e60dd4e to eae51ac Compare May 16, 2024 11:13
@BastiaanOlij BastiaanOlij force-pushed the add_htc_passthrough branch from eae51ac to bb0b3c5 Compare May 17, 2024 03:12
Copy link
Collaborator

@m4gr3d m4gr3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Collaborator

@dsnopek dsnopek left a 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!

@dsnopek
Copy link
Collaborator

dsnopek commented May 22, 2024

Looks like this needs a rebase on conflicts in CHANGES.md

Co-authored-by: seichter
@BastiaanOlij BastiaanOlij force-pushed the add_htc_passthrough branch from bb0b3c5 to 044deef Compare May 30, 2024 01:57
@m4gr3d m4gr3d merged commit 04d8ab8 into GodotVR:master May 30, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants