three.js icon indicating copy to clipboard operation
three.js copied to clipboard

WebXR: Make Depth sensing occlusion tunable

Open michaelthatsit opened this issue 1 year ago • 0 comments

Description

We have use cases in mrjs that require we dynamically un-occlude parts of the environment.

Currently, without depth-sensing, we create plane meshes for the walls and disable colorWrite and set their rendering order to a value ahead of all other objects, then set visible to false when we want to see beyond them. see the screenshot below for an example

Screenshot 2024-01-30 at 4 13 14 PM

We'd like to be able to benefit from the better body occlusion provided by depth-sensing, without inhibiting our ability to achieve the above.

Solution

An API to tune depth-sensing occlusion by distance. something like

renderer.xr.depthSensing.near = 0.1
renderer.xr.depthSensing.far = 1

Alternatives

provide depth-sensing data without enabling occlusion by default.

Additional context

No response

michaelthatsit avatar Feb 02 '24 04:02 michaelthatsit