Skip to content

TSL: Fix auto-cache if using multiple conditionals #31076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 10, 2025

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented May 10, 2025

Fixes #31039

Description

Fix loss of reference to the context of sub-conditionals failing to automatically generate temporary variables.

@sunag sunag added this to the r177 milestone May 10, 2025
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.29
78.32
336.29
78.32
+0 B
+0 B
WebGPU 548.37
152.05
548.41
152.04
+37 B
-13 B
WebGPU Nodes 547.72
151.9
547.76
151.88
+37 B
-13 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 466.23
112.58
466.23
112.58
+0 B
+0 B
WebGPU 623.15
168.75
623.19
168.74
+37 B
-10 B
WebGPU Nodes 578.02
158.03
578.06
158.03
+37 B
-7 B

@sunag sunag marked this pull request as ready for review May 10, 2025 03:32
@sunag sunag merged commit 6bcfbf5 into mrdoob:dev May 10, 2025
12 checks passed
@sunag sunag deleted the dev-fix-conditional branch May 10, 2025 03:33
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* fix flow

* prevent re-update outputNode

* Update ContextNode.js
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* fix flow

* prevent re-update outputNode

* Update ContextNode.js
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.

TSL - Nested If-nodes cause wrong code compilation
1 participant