-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
WebGLRenderer: Fix WebXR depth sensing. #28530
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
document.body.appendChild( XRButton.createButton( renderer, { 'optionalFeatures': [ 'depth-sensing'] } ) ); | ||
document.body.appendChild( XRButton.createButton( renderer, { | ||
'optionalFeatures': [ 'depth-sensing' ], | ||
'depthSensing': { 'usagePreference': [ 'gpu-optimized' ], 'dataFormatPreference': [] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 'dataFormatPreference': []
needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. We're updating the spec to specify that an empty array means that the value is optional.
Depth sensing is broken in the current version of three.js.
This change will restore depth sorting functionality and also removes the extra renderpass of the previous solution.
The samples also didn't add the depthSensing dictionary during session creation. Quest browser wasn't spec compliant so didn't pass this in. That will be fixed in a future version of the spec.
cc @Mugen87