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.
It seems that, as for now, threejs doesn't support
cpu-optimized
WebXR depth-sensing.I'm using an older device (a Pixel 3) and found that a lot of the WebXR examples don't work on this phone.
I think there are two issues with supporting this device (and probably a few other order devices, too), but please do correct my if I've misunderstood anything:
glBinding = new XRWebGLBinding
ifsession.renderState.layers
exists, that is, if the WebXR-layers module is being supported (code here).cpu-optimized
depth sensing; but currently threejs seems to only use the gpu-optimized access method (code here, cpu-style access method described here)So I've been playing around with this a little bit - I hope that this PR can serve as a basis for discussion.
I guess we'd have to figure out a few questions, though:
WebXRDepthSensing
class - this PR creates aWebXRDepthSensingCpu
class.WebXRDepthSensing
API surface perfectly: for example, we could create a WebGL texture from the cpu-array to mirror thegetDepthTexture
method, but that would involve a lot of copying of data from cpu to gpu.WebXRDepthSensingCpu
look like?With or without cpu-optimized depth-sensing, threejs has pretty nice WebXR support - thanks btw for all those examples! For now I've refrained from creating a concrete example for cpu-based depth-sensing, just because I guess that from this discussion some significant changes might still come about.
Cheers!