Skip to content

RenderList: Fix occlusionQueryCount.#33765

Merged
Mugen87 merged 2 commits into
mrdoob:devfrom
Mugen87:dev1
Jun 10, 2026
Merged

RenderList: Fix occlusionQueryCount.#33765
Mugen87 merged 2 commits into
mrdoob:devfrom
Mugen87:dev1

Conversation

@Mugen87

@Mugen87 Mugen87 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Fixed #33759.

Description

The bug reported in #33759 is real but it can be fixed in a much more simple way than proposed.

RenderList just has to make sure to not count the same 3D object multiple times. So we apply the same "lastObject" tracking from the backends to the render lists to correctly count objects.

Both reproduction test cases from the issue are fixed with this PR.

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 365.48
86.82
365.48
86.82
+0 B
+0 B
WebGPU 665.87
184.23
666
184.26
+122 B
+34 B
WebGPU Nodes 663.91
183.92
664.04
183.96
+122 B
+34 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 507.44
123.35
507.44
123.35
+0 B
+0 B
WebGPU 745.11
200.44
745.23
200.48
+122 B
+37 B
WebGPU Nodes 694.33
187.89
694.45
187.91
+122 B
+25 B

@Mugen87 Mugen87 added this to the r185 milestone Jun 10, 2026
@Mugen87 Mugen87 merged commit 9977fe0 into mrdoob:dev Jun 10, 2026
10 checks passed
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

Successfully merging this pull request may close these issues.

WebGPU/WebGL occlusion queries crash: resolveOccludedAsync does WeakSet.add(undefined)

1 participant