WebXR depth sensing API#2561
Merged
willeastcott merged 14 commits intoplaycanvas:masterfrom Dec 31, 2020
Merged
Conversation
Collaborator
Author
|
Chrome 87 just has been released to Android. So it works behind the WebXR Incubators flag in release Chrome. Cl seems to be failing here, with "Setup Java JDK" errors. Not sure how to fix it. |
Collaborator
Author
|
There have been recent changes to Depth Sensing API, based on community provided feedback. |
Contributor
|
Hey @Maksims, can you resolve conflicts in |
willeastcott
approved these changes
Dec 31, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements WebXR Depth Sensing API: https://github.com/immersive-web/depth-sensing/blob/main/explainer.md
Which is available in Chrome 87 (
BetaRelease) behind chrome://flags/#webxr-incubations flag.It provides two paths (CPU and GPU) to access depth information which is provided by underlying AR system.
New APIs:
Test projects:
CPU Path: https://playcanvas.com/project/732030/overview/ar-depth-sensing
It implements CPU path to test for depth in middle of the screen, and allows to plant grass (like hit test example), but works way more reliably than hit test path.
GPU Path: https://playcanvas.com/project/738358/overview/ar-depth-sensing-texture
It implements GPU path by accessing depth sensing texture, and rendering it on top of the camera view, with shader that unpacks depth information and represents it as a gradient (red > yellow > green > cyan) which is distance from 0 to 8 meters.
Depth Occlusion: https://playcanvas.com/project/738703/overview/ar-depth-sensing-occlusion
Demo: https://playcanv.as/p/UN0z1XE2/ (don't forget to enable chrome://flags/#webxr-incubations)
This demo has few things: cpu path object placement, gpu path occlusion using shader and light estimation.
Link to video: https://twitter.com/mrmaxm/status/1329151944540254208
I confirm I have signed the Contributor License Agreement.