-
Notifications
You must be signed in to change notification settings - Fork 25
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
Depth API #133
Comments
We really want to implement the Depth API, and will get around to it eventually, but no one has really started to look into this yet. If you'd like to give it a try, that'd be great! There's a possibility that this will require making some changes to Godot itself, but there's no way to tell without digging into it.
We do include the Meta headers - you can find the header for the necessary OpenXR extension here: |
I've been researching this a tiny bit, and here's some links to resources:
Looking through the sample, it looks like we're expected to change our fragment shader to consult the depth texture that we get from the OpenXR extension. Here's the relevant bit: https://github.com/meta-quest/Meta-OpenXR-SDK/blob/main/Samples/XrSamples/XrPassthroughOcclusion/Src/XrPassthroughOcclusionGl.cpp#L632 In order to make this work, we'll either need to:
Nr 2 could potentially be made easier if Godot allowed users to override Godot's shader templates - see PR godotengine/godot#94427 In any case, this won't be the easiest OpenXR extension to integrate with Godot |
I'm wondering if adding a Compositor Effect to the XRCamera3D to post process the eye buffers with the depth information might work... Still reading up on how they work to see if that's an option, but I imagine it'd be less efficient than doing this in a single pass with the builtin shaders |
There are now two WIP PRs attempting to implement this:
It would be nice if we could get the approach of using global uniforms from PR #232 working. It's not the most ideal developer experience (you need to use a custom shader for all materials), but it doesn't require changing Godot itself, and should be efficient performance-wise. |
Hi,
Are there any plans on implementing a depth API for meta devices?
I would love to contribute and help but I have never worked on open source before.
(I do have a very solid knowledge of C++)
I expected to find the Meta Native SDK somewhere in the repository but I couldn't find it.
Regards,
The text was updated successfully, but these errors were encountered: