Skip to content
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

Support for WebXR Depth Sensing? #309

Open
Patrick-van-Halm-360Fabriek opened this issue Mar 28, 2024 · 0 comments
Open

Support for WebXR Depth Sensing? #309

Patrick-van-Halm-360Fabriek opened this issue Mar 28, 2024 · 0 comments

Comments

@Patrick-van-Halm-360Fabriek
Copy link

Will there be support for WebXR Depth Sensing, since currently there are issues with it?

toggleSession("immersive-ar", {
  sessionInit: {
    optionalFeatures: ["light-estimation", "depth-sensing"],
    requiredFeatures: ["hit-test", "local"],
    // @ts-ignore
    depthSensing: {
      usagePreference: ["cpu-optimized", "gpu-optimized"],
      dataFormatPreference: ["luminance-alpha", "float32"],
    },
  }
});

Causes an error as soon as the XR session is started. Within Three JS it seems like the XRManager:

if ( enabledFeatures && enabledFeatures.includes( 'depth-sensing' ) ) {
  const depthData = glBinding.getDepthInformation( views[ 0 ] ); // Throws error since glBinding is null/undefined
  if ( depthData && depthData.isValid && depthData.texture ) {
    depthSensing.init( renderer, depthData, session.renderState );
  }
}

Depth Sensing has been added to Three JS since r161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant