Skip to content

WebGPURenderer: Add ReadbackBuffer as parameter#33315

Open
sunag wants to merge 3 commits intomrdoob:devfrom
sunag:dev-readbackbuffer
Open

WebGPURenderer: Add ReadbackBuffer as parameter#33315
sunag wants to merge 3 commits intomrdoob:devfrom
sunag:dev-readbackbuffer

Conversation

@sunag
Copy link
Copy Markdown
Collaborator

@sunag sunag commented Apr 2, 2026

Fixes #33281

Description

Add ReadbackBuffer as a parameter; this should help share the GPU buffer between attributes.

const readbackBuffer = new THREE.ReadbackBuffer( size );

const arrayBuffer = await renderer.getArrayBufferAsync( attribute, readbackBuffer );

/cc @gkjohnson

@sunag sunag added this to the r184 milestone Apr 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 360.57
85.58
360.57
85.58
+0 B
+0 B
WebGPU 635.53
176.41
635.58
176.46
+45 B
+44 B
WebGPU Nodes 633.65
176.12
633.69
176.16
+45 B
+43 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 492.95
120.2
492.95
120.2
+0 B
+0 B
WebGPU 707.71
191.31
707.76
191.35
+45 B
+40 B
WebGPU Nodes 656.93
178.57
656.98
178.61
+45 B
+42 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.

WebGPURenderer: Fix "getArrayBufferAsync" to avoid severe GC pressure

1 participant