Skip to content

Conversation

@holtsetio
Copy link
Contributor

Description

This adds the indirectOffset parameter to the BufferGeometry class, corresponding to the indirectOffset parameter in the WebGPU drawIndirect/drawIndexedIndirect API functions

https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/drawIndirect
https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/drawIndexedIndirect

@github-actions
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 350.29
83.05
350.29
83.05
+0 B
+0 B
WebGPU 613.38
170.32
613.55
170.35
+170 B
+30 B
WebGPU Nodes 611.98
170.04
612.15
170.07
+170 B
+32 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 482.23
117.82
482.28
117.83
+48 B
+11 B
WebGPU 684.5
186.13
684.71
186.16
+218 B
+32 B
WebGPU Nodes 634.32
173.31
634.54
173.34
+218 B
+34 B

@Mugen87 Mugen87 added this to the r182 milestone Nov 27, 2025
@holtsetio
Copy link
Contributor Author

Next step would be to also add this to compute shaders, but I don't know yet how to do this the most elegant way. Add another param to the compute() call?

@sunag
Copy link
Collaborator

sunag commented Nov 27, 2025

Next step would be to also add this to compute shaders, but I don't know yet how to do this the most elegant way. Add another param to the compute() call?

Hmm... It would be easier to visualize with an example, if you have one.

@sunag sunag merged commit 58d9d50 into mrdoob:dev Nov 27, 2025
10 checks passed
RenaudRohlinger added a commit to RenaudRohlinger/three.js that referenced this pull request Nov 29, 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.

3 participants