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

OpenXR: Fix enabling passthrough via environment blend mode in project settings #94550

Merged

Conversation

dsnopek
Copy link
Contributor

@dsnopek dsnopek commented Jul 19, 2024

PR #87630 made it possible to enable passthrough by setting the environment blend mode to "alpha blend", even on headsets that need to use a special passthrough extension - in that case it works by emulating alpha blend mode.

Currently, this is working great if you set the environment blend mode via code!

However, it you set it in project settings, you'll get this error:

OpenXR: XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND isn't supported, defaulting to XR_ENVIRONMENT_BLEND_MODE_OPAQUE

This is because we're checking the blend mode before OpenXR extension wrappers have had the opportunity to enable emulation of alpha blend mode.

This PR basically moves these checks to later, after on_session_created() is run on all the extension wrappers.

modules/openxr/openxr_api.cpp Outdated Show resolved Hide resolved
@dsnopek dsnopek force-pushed the openxr-passthrough-project-settings branch from a4af6ac to 22a6303 Compare July 20, 2024 00:04
Copy link
Contributor

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

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

lgtm

@akien-mga akien-mga merged commit 4be1529 into godotengine:master Jul 22, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants