-
Notifications
You must be signed in to change notification settings - Fork 23
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
Make use of depth extension in openxr backend #92
Comments
Potentially, if we enable the depth extension. |
@paulrouget Could you try building https://github.com/jdm/servo/tree/depthkhr and see if there's an noticeable improvement with respect to image stability or jitteriness on any of the more complex demos? This is my attempt to implement https://github.com/microsoft/OpenXR-SDK-VisualStudio/#submit-depth-buffer-for-projection-layers, and it's made of the changes to https://github.com/jdm/webxr/tree/depthkhr and https://github.com/servo/openxrs/tree/depthkhr. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I can't really see any difference. Do you have a demo in mind that has some significant jittering? By image stability, you are talking about the issue with the content lagging a bit behind? |
@paulrouget Oops, I forgot to enable the appropriate extension. See if there's any difference if you add |
Ok, with the extension enabled the emulator is no longer drawing the background of the babylon colour picker demo in immersive mode. I wonder if some of the depth/z values at jdm@61096f7#diff-f3cfd7c22eb8b9fb4aeefdabdb68f7e4R621-R625 is causing it to be ignored? |
We're going to need to do something a bit different here. We will need to:
|
For the background issue, be aware that that new version of the color picker demo uses AR mode now. |
It's a lot more choppy. And it feels like there's tearing (top part moving ahead of the bottom part). |
#92 (comment) seems like it was made more challenging by the changes to wrap the openxr swapchain in the EGL surface. There is a separate depth swapchain created in the sample code. |
So eglCreatePbufferFromClientBuffer does allocate a depth buffer if requested, so the challenge is extracting that data and getting it into the d3d swapchain. Some potential options include:
|
It would be nice if this copying could occur as part of the render_animation_frame method in the openxr backend, but because of the limitation that the EGL surface wrapping the d3d texture (and therefore its associated depth buffer) is only usable from the webgl thread it requires some more hacks instead. |
Right now we only pass gl::COLOR_BUFFER as the mask argument for blit_framebuffer to copy the texture data from the webgl texture to the d3d texture. Would including gl::DEPTH_BUFFER as well enable better image stability?
The text was updated successfully, but these errors were encountered: