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: Emulated alpha blend mode should override the real blend mode #103338

Merged

Conversation

dsnopek
Copy link
Contributor

@dsnopek dsnopek commented Feb 26, 2025

Back in PR #87630 (released with Godot 4.3), we added the ability for GDExtensions to "emulate" the alpha blend mode, so that passthrough could be enabled via the standard OpenXR way on all headsets, even those that don't have real support for alpha blend mode.

For example, we have the XR_FB_passthrough and XR_HTC_passthrough extension in the 'godot_openxr_vendors' GDExtension, that will emulate it on Meta and HTC headsets.

However, this can cause some problems on headsets that support both the alpha blend mode and one of the passthrough extensions. For example, Pico headsets support XR_FB_passthrough and a real alpha blend mode.

The current code in Godot favors the real blend mode, and report that it's using that, even if an extension has told Godot that it is emulating it. This PR reverses that.

This is because the extensions can support more features than just turning passthrough on and off (which is all the alpha blend can do). So, the idea is, if one of the passthrough extensions is enabled and doing emulation, that should be used rather than the real alpha blend mode.

@BastiaanOlij
Copy link
Contributor

BastiaanOlij commented Feb 27, 2025

which is all the alpha blend can do

I'd add "currently" to that. I do think that as passthrough gets more standardised alpha blend will catch up to vendor specific features.

That said, totally agree with this approach.

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

@BastiaanOlij
Copy link
Contributor

Also seeing this is pretty much a bugfix without which passthrough is broken on some devices and should lead to correct behaviour (though without the ability of the user to chose) without a fix on the vendor side, I would like to recommend we merge this for 4.4 or at the very least cherry pick it for 4.4.1

@Calinou Calinou added the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Feb 27, 2025
@akien-mga akien-mga removed the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Feb 27, 2025
@akien-mga akien-mga modified the milestones: 4.5, 4.4 Feb 27, 2025
@akien-mga akien-mga merged commit dd43d40 into godotengine:master Feb 27, 2025
20 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