Skip to content
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

TSL: Improve vec* checks and warnings #30811

Merged
merged 1 commit into from
Mar 27, 2025
Merged

TSL: Improve vec* checks and warnings #30811

merged 1 commit into from
Mar 27, 2025

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Mar 27, 2025

Description

Improves errors and prevents the renderer from crashing if the vector composition is larger than the supported type size.

Code

materialBox.colorNode = vec4( 1, 1, vec4() );

Now

image

Old

image

@sunag sunag added this to the r175 milestone Mar 27, 2025
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.08
78.29
336.08
78.29
+0 B
+0 B
WebGPU 532.29
147.91
531.5
147.68
-798 B
-230 B
WebGPU Nodes 531.76
147.8
530.96
147.57
-798 B
-231 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.15
112.18
465.15
112.18
+0 B
+0 B
WebGPU 604
163.91
603.2
163.67
-802 B
-248 B
WebGPU Nodes 559.03
153.36
558.23
153.1
-802 B
-258 B

@sunag sunag marked this pull request as ready for review March 27, 2025 19:38
@sunag sunag merged commit 3cf407d into mrdoob:dev Mar 27, 2025
12 checks passed
@sunag sunag deleted the dev-vectors branch March 27, 2025 19:46
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