You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use the Varjo XR3 headset (in OpenXR mode) with Godot 4 (with OpenXR and passthrough activated), the passthrough does not work, i.e. the scene is rendered on a black background instead of the camera stream.
It seems to me that are two problems in the openxr module, more precisely in the openx_api.cpp file (fixing them solves the issue) :
The XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT is only set when the number of layers is > 1, which is fine for the Meta Quest headset but does not work for the Varjo since it only requires one layer.
The environment blend mode XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND is only really set when the XRFbPassthrough extension is present, which is not the case with the Varjo runtime.
I am not sure how to fix this without causing issues for other headsets.
Would it be an issue to always activate the XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT ?
Could blend modes be activated even if they are not supported by an extension ?
Steps to reproduce
Create a Godot 4 project with OpenXR activated in Compatibility mode
I'm missing something, enabling the passthrough system (as in enabling Metas passthrough extension) set the blend mode and indeed adds the extra layer, which is just one of the two options.
If all that is needed is to set the blend mode, than don't enable the passthrough extension, instead just set the blend mode through code (xr_interface.set_environment_blend_mode(xr_interface.XR_ENV_BLEND_MODE_ALPHA_BLEND)).
I planned adding that to the project settings as well but looks like I forgot about that.
After checking again, it seems that the blend mode is correctly selected but that the issue comes from the layers_list.size()>0 test in the projection layer (in openxr_api.cpp), which seems to be false for the Varjo, which means that the XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT is not set.
Just removing the test fixes the passthrough rendering.
Godot version
4.1
System information
Windows 10 - Godot 4.1.1 - Compatibility
Issue description
When trying to use the Varjo XR3 headset (in OpenXR mode) with Godot 4 (with OpenXR and passthrough activated), the passthrough does not work, i.e. the scene is rendered on a black background instead of the camera stream.
It seems to me that are two problems in the openxr module, more precisely in the openx_api.cpp file (fixing them solves the issue) :
I am not sure how to fix this without causing issues for other headsets.
Steps to reproduce
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: