Skip to content

Conversation

@arodic
Copy link
Contributor

@arodic arodic commented Feb 1, 2026

Related issue: #32926

NodeMaterialObserver: track renderId per render object instead of per observer

Multiple render objects sharing the same observer (same cache key) would
incorrectly skip geometry updates because the first object processed would
set the shared renderId, causing subsequent objects to fall through to
equals() which only checked attribute.version, not actual attribute identity.

When setAttribute()/setIndex() replaces an attribute with a new object
that has the same version number, the cache incorrectly treated it as
unchanged, causing GPU buffer creation to be skipped and a crash on render.

Changes:

  • Move renderId from observer-level to per-render-object data
  • All render objects now get the fast renderId path (performance Impact should be positive if any - but havent checked)

@github-actions
Copy link

github-actions bot commented Feb 1, 2026

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.21
85.29
359.21
85.29
+0 B
+0 B
WebGPU 617.06
171.62
623.7
173.38
+6.64 kB
+1.77 kB
WebGPU Nodes 615.64
171.37
622.28
173.13
+6.64 kB
+1.76 kB

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 490.47
119.49
490.47
119.49
+0 B
+0 B
WebGPU 690.36
186.56
690.36
186.56
-7 B
+0 B
WebGPU Nodes 639.75
173.96
639.74
173.96
-7 B
+0 B

@arodic arodic marked this pull request as ready for review February 1, 2026 18:13
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.

1 participant