Skip to content

Conversation

@TheBlek
Copy link
Contributor

@TheBlek TheBlek commented Oct 27, 2025

Related issue: #30982

Description

This is a follow-up PR for #31488

  • Fix types for compute and computeAsync functions
  • Handle indirect buffer in webgl backend gracefully
  • In webgpu_compute_particles example make only half of the balls move based on an indirect buffer
  • Respect dispatchSize when running computeAsync from compute on uninitialized renderer

cc: @sunag

@github-actions
Copy link

github-actions bot commented Oct 27, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 350.11
84.81
350.11
84.81
+0 B
+0 B
WebGPU 605.24
169.71
605.42
169.77
+181 B
+58 B
WebGPU Nodes 603.85
169.47
604.03
169.53
+181 B
+53 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 481.77
119.56
481.77
119.56
+0 B
+0 B
WebGPU 674.62
185.19
674.8
185.24
+182 B
+54 B
WebGPU Nodes 616.61
168.41
616.79
168.47
+182 B
+57 B

@sunag sunag added this to the r181 milestone Oct 27, 2025
@sunag
Copy link
Collaborator

sunag commented Oct 27, 2025

In webgpu_compute_particles example make only half of the balls move based on an indirect buffer

I think we'd better add this in another example.

@cmhhelgeson
Copy link
Contributor

In webgpu_compute_particles example make only half of the balls move based on an indirect buffer

I think we'd better add this in another example.

Rain would probably be a better use case right? The number of compute droplets can be changed to equal the number of rendered droplets rather than always computing the maximum.

@sunag sunag merged commit ca2f49e into mrdoob:dev Oct 28, 2025
13 of 14 checks passed
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.

3 participants