three.js
three.js copied to clipboard
WebXR: Make Depth sensing occlusion tunable
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
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