GodotVR / godot_openxr_vendors

Godot 4 wrapper for OpenXR vendors loaders and extensions
MIT License
99 stars 22 forks source link

Implement remaining functionality in XR_FB_passthrough extension wrapper #115

Closed devloglogan closed 5 months ago

devloglogan commented 6 months ago

This PR adds all of the remaining passthrough functionality that we're currently missing for the XR_FB_passthrough extension. Quick video showing some of the features:

https://github.com/GodotVR/godot_openxr_vendors/assets/95497005/0649d152-5e1e-45c9-9111-202ffee8883c

Geometry Passthrough

I've added a new OpenXRFbPassthroughGeometry node, when visible, these nodes will register themselves with OpenXRFbPassthroughExtensionWrapper and begin geometry passthrough. If the blend_mode of XRInterface is set to XR_ENV_BLEND_MODE_ALPHA_BLEND, then "full passthrough" should always take place instead. These nodes can be moved and scaled, and their passthrough geometry will update accordingly.

Passthrough Style

Some functions have been added to OpenXRFbPassthroughExtensionWrapper to update passthrough styles. Note that edge color is available in all styles, while the other three are mutually exclusive and will automatically enable when set.

Passthrough Capabilities

OpenXRFbPassthroughExtensionWrapper also now has some functions that can be called to check the capabilities of the headset.

I've also added a signal that should fire if there are any XrEventDataPassthroughStateChangedFB events passed through, though I'm unsure at the moment if there's a way to test these.

m4gr3d commented 5 months ago

@devloglogan Can you rebase this PR.

devloglogan commented 5 months ago

Rebased!