Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 8, 2025

Fixed #32198.

Description

Computing a tangent attribute when building nodes corrupts the cache key and leads to confusing behavior like described in #32198. For a more consistent behavior, it's better to let the application compute tangent vectors if they are missing in geometry data. Developers might prefer to use BufferGeometryUtils.computeMikkTSpaceTangents() anyway for tangent computation.

Removing the auto-generation triggers below warning if tangent are missing so users should be informed about what's going on:

THREE.AttributeNode: Vertex attribute "tangent" not found on geometry.

@github-actions
Copy link

github-actions bot commented Nov 8, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 356.24
86.47
356.24
86.47
+0 B
+0 B
WebGPU 610.57
171.28
610.49
171.27
-81 B
-15 B
WebGPU Nodes 609.18
171.02
609.1
171.01
-81 B
-16 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 487.87
121.22
487.87
121.22
+0 B
+0 B
WebGPU 679.35
186.51
679.27
186.49
-81 B
-23 B
WebGPU Nodes 621.07
169.69
620.99
169.67
-81 B
-17 B

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.

Applying a cloned NodeMaterial to another geometry throws an error if tangent/bitangent nodes are used

1 participant