Skip to content

TSL: Fix stack node sequence#33402

Merged
sunag merged 8 commits intomrdoob:devfrom
sunag:dev-fix-stack-append
Apr 29, 2026
Merged

TSL: Fix stack node sequence#33402
sunag merged 8 commits intomrdoob:devfrom
sunag:dev-fix-stack-append

Conversation

@sunag
Copy link
Copy Markdown
Collaborator

@sunag sunag commented Apr 17, 2026

Closes #32872, Related #31929 (comment)

Description

Insert the Node sequence based on the current stack context; this should fix issues where .toStack() may be out of sync with the process of related sub-stacks, which is common in conditional loop nodes.

This should fix the reason why positionLocal was executing before the vertex transformations, https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language#position and #32873 (comment)

/cc @PoseidonEnergy

@sunag sunag added this to the r185 milestone Apr 17, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 17, 2026

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 365.32
86.79
365.32
86.79
+0 B
+0 B
WebGPU 642.18
178.37
640.91
177.89
-1.26 kB
-481 B
WebGPU Nodes 640.3
178.08
639.03
177.6
-1.26 kB
-481 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 497.9
121.48
497.9
121.48
+0 B
+0 B
WebGPU 714.04
193.25
712.77
192.79
-1.27 kB
-464 B
WebGPU Nodes 663.26
180.59
661.99
180.09
-1.27 kB
-498 B

@sunag sunag added Migration Guide TSL Three.js Shading Language labels Apr 17, 2026
@sunag sunag marked this pull request as ready for review April 29, 2026 02:46
@sunag sunag merged commit cb787f2 into mrdoob:dev Apr 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Migration Guide TSL Three.js Shading Language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TSL: toStack() doesn't always run a node instantly?

1 participant