Skip to content

setTransparentPickingEnabled(false) does not disable transparent picking unless a skybox is present #9687

@nmfisher

Description

@nmfisher

⚠️ Issues not using this template will be systematically closed.

Describe the bug
When setTransparentPickingEnabled is false (the default) with no skybox, transparent objects are still picked. The scene requires a skybox for the expected behaviour (i.e. that picking on a transparent object returns a null entity).

To Reproduce
Steps to reproduce the behavior:

  1. Load a glTF model with a transparent material (alphaMode: "BLEND") in gltf_viewer
  2. Hide the skybox via the UI
  3. Click on the transparent object
  4. The UI will show the name of the entity

Expected behavior
When setTransparentPickingEnabled is false and no skybox, clicking on a transparent object should return he null entity (if nothing opaque is behind it)

Screenshots

Picking transparent object with skybox (expected behaviour, nothing shows as picked):
Image

Picking transparent object without skybox (unexpected behaviour, cube shows as picked):
Image

Logs
N/A

Desktop (please complete the following information):

  • OS: macOS 15.5
  • Backend: metal

Additional context
Not sure if this is a bug or a documentation issue. Adding the following to this line

seems to fix the issue:

                curr->key |= select(filterTranslucentObjects && translucent);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions