Skip to content

WebXR: Make Depth sensing occlusion tunable #27664

@michaelthatsit

Description

@michaelthatsit

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions