Skip to content

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented May 12, 2025

Description

In WebGPURenderer instances are created through TSL functions, this allows for easier skinning and sprite instancing which is very useful for particles. Practically all webgpu examples of instances already use it, the property is just not declared.

@sunag sunag added this to the r177 milestone May 12, 2025
@github-actions
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.26
78.64
337.26
78.64
+0 B
+0 B
WebGPU 548.43
152.04
548.43
152.04
+0 B
+0 B
WebGPU Nodes 547.78
151.89
547.78
151.89
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 467.33
112.95
467.34
112.95
+13 B
+8 B
WebGPU 623.34
168.78
623.35
168.79
+13 B
+7 B
WebGPU Nodes 578.19
158.07
578.2
158.07
+13 B
+6 B

@sunag sunag marked this pull request as ready for review May 12, 2025 18:02
@sunag sunag merged commit 70316d6 into mrdoob:dev May 13, 2025
12 checks passed
@sunag sunag deleted the dev-mesh branch May 13, 2025 02:52
@Makio64
Copy link
Contributor

Makio64 commented May 14, 2025

@sunag while exploring the particles examples fews weeks ago i realize in webgpu renderer there are different approach of how make them in TSL, which approach will you recommend ?

@sunag
Copy link
Collaborator Author

sunag commented May 14, 2025

There are two main approaches to particles. The deterministic one is useful for simple smoke, spark, fire effects for example. If you need particles that interact with the scene, objects, etc. I recommend compute particle.

RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
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.

2 participants