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

WebGPURenderer: update Line2NodeMaterial and InstancedPointsNodeMaterial #29319

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

aardgoose
Copy link
Contributor

@aardgoose aardgoose commented Sep 4, 2024

Update TSL to remove hacks using property() to force variable assignments into the correct locations.
Use lengthSq() in InstancedPointsNodeMaterial.
trimSegment() is now a real function, not inlined.
.

@sunag dashed mode for Line2 was broken since #28585

Copy link

github-actions bot commented Sep 4, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 685.1 kB
169.6 kB
685.1 kB
169.6 kB
+0 B
+0 B
WebGPU 823 kB
220.9 kB
822.9 kB
220.8 kB
-162 B
-59 B
WebGPU Nodes 822.6 kB
220.8 kB
822.5 kB
220.7 kB
+257 B
+35 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 461.9 kB
111.4 kB
461.9 kB
111.4 kB
+0 B
+0 B
WebGPU 522.1 kB
140.8 kB
522.1 kB
140.8 kB
+0 B
+0 B
WebGPU Nodes 478.8 kB
130.6 kB
478.8 kB
130.6 kB
-43.34 kB
+0 B

@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 4, 2024

So this PR fixes #28884?

@Mugen87 Mugen87 added this to the r169 milestone Sep 4, 2024
@aardgoose
Copy link
Contributor Author

No, just a tidy up. just raising the profile of the problem

@sunag sunag merged commit 85cbb66 into mrdoob:dev Sep 5, 2024
12 checks passed
@mrdoob
Copy link
Owner

mrdoob commented Sep 5, 2024

@sunag

What's going on with these WebGPU Nodes results?

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 461.9 kB
111.4 kB
461.9 kB
111.4 kB
+0 B
+0 B
WebGPU 522.1 kB
140.8 kB
522.1 kB
140.8 kB
+0 B
+0 B
WebGPU Nodes 478.8 kB
130.6 kB
478.8 kB
130.6 kB
-43.34 kB
+0 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.

4 participants