Skip to content

TSL: Add batchIndirectIndex.#34111

Open
Mugen87 wants to merge 1 commit into
mrdoob:devfrom
Mugen87:dev2
Open

TSL: Add batchIndirectIndex.#34111
Mugen87 wants to merge 1 commit into
mrdoob:devfrom
Mugen87:dev2

Conversation

@Mugen87

@Mugen87 Mugen87 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Fixed #33477.

Description

The PR introduces the TSL object batchIndirectIndex that allows access tot he indirect index of a batched mesh.

@John-D-a-i @MicolaL Would this work for your use cases?

@Mugen87 Mugen87 added this to the r186 milestone Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 365.88
86.71
365.88
86.71
+0 B
+0 B
WebGPU 685.67
189.48
685.74
189.52
+74 B
+37 B
WebGPU Nodes 683.65
189.16
683.73
189.19
+74 B
+36 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 510.55
124.02
510.55
124.02
+0 B
+0 B
WebGPU 764.04
205.54
764.09
205.54
+52 B
+4 B
WebGPU Nodes 713.54
192.96
713.59
192.97
+52 B
+14 B

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

🖼️ E2E screenshot tests

1 example(s) failed (full artifacts).

Example Expected Actual Diff
webgpu_animation_retargeting

@John-D-a-i

John-D-a-i commented Jul 25, 2026

Copy link
Copy Markdown

Fixed #33477.

Description

The PR introduces the TSL object batchIndirectIndex that allows access tot he indirect index of a batched mesh.

@John-D-a-i @MicolaL Would this work for your use cases?

On my end, all I need is to obtain the instance ID of the BatchedMesh. I'll give it a try after it's released. Is it necessary to pass the BatchedMesh object, or will the material automatically recognize it?

@Mugen87

Mugen87 commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator Author

I would be great if you could patch your local version with this change and make a test. It won't be merged without a test.

You don't need to pass the the batched mesh. batchIndirectIndex is not a TSL function. It's an accessor object similar to vertexIndex or instanceIndex and used in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants