Skip to content

Commit

Permalink
Do not try to create WebXRDepthSensing object with cpu-optimized dept…
Browse files Browse the repository at this point in the history
…h. (mrdoob#30241)
  • Loading branch information
dli7319 authored Jan 3, 2025
1 parent 3778581 commit 3abfd88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/renderers/webxr/WebXRManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,11 @@ class WebXRManager extends EventDispatcher {
//

const enabledFeatures = session.enabledFeatures;
const gpuDepthSensingEnabled = enabledFeatures &&
enabledFeatures.includes( 'depth-sensing' ) &&
session.depthUsage == 'gpu-optimized';

if ( enabledFeatures && enabledFeatures.includes( 'depth-sensing' ) ) {
if ( gpuDepthSensingEnabled && glBinding ) {

const depthData = glBinding.getDepthInformation( views[ 0 ] );

Expand Down

0 comments on commit 3abfd88

Please sign in to comment.