Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 22, 2025

Fixed #31708.

Description

#31708 shows that clipping fails when meshes share the same material since bindings are not correctly updated. The cache hit prevents the update of clipping uniforms which are in the object scope right now.

Since these data are equal for all render items that use a specific clipping node instance, we can move the data into the render UBO scope.

@github-actions
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.91
79.1
338.91
79.1
+0 B
+0 B
WebGPU 577.1
159.18
577.16
159.18
+65 B
+7 B
WebGPU Nodes 575.71
158.93
575.77
158.94
+65 B
+7 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 470.7
113.91
470.7
113.91
+0 B
+0 B
WebGPU 647.66
175.14
647.72
175.15
+65 B
+9 B
WebGPU Nodes 601.76
164.31
601.82
164.31
+65 B
+4 B

@Mugen87 Mugen87 added this to the r180 milestone Aug 22, 2025
@sunag sunag merged commit b52aff8 into mrdoob:dev Aug 22, 2025
9 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.

ClippingGroup stops working when adding these specific meshes

2 participants