Skip to content

WebGPURenderer: Honor layerUpdates for array textures#33072

Merged
Mugen87 merged 2 commits into
mrdoob:devfrom
ahaensler:partial-texture-upload-webgpu
Feb 26, 2026
Merged

WebGPURenderer: Honor layerUpdates for array textures#33072
Mugen87 merged 2 commits into
mrdoob:devfrom
ahaensler:partial-texture-upload-webgpu

Conversation

@ahaensler

Copy link
Copy Markdown
Contributor

Description

The DataArrayTexture.layerUpdates is ignored in the WebGPU backend. This PR fixes this and enables partial updates. Layer updates are much smoother now and there is no stutter.

Unrelated to the PR - some points that people may find useful

  • WebGPU limits depth to 256. Call WebGPURenderer({requiredLimits: { maxTextureArrayLayers: 2048 }} to increase the limit.
  • You can use data arrays with BatchedMesh, but neither BatchNode.batchingIdNode nor instanceIndex will work for indexing. The correct index is found here. This node is not exposed yet in the API.

@github-actions

github-actions Bot commented Feb 26, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.49
85.34
359.49
85.34
+0 B
+0 B
WebGPU 626.44
174.13
626.58
174.15
+142 B
+28 B
WebGPU Nodes 625.02
173.88
625.16
173.91
+142 B
+29 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 491.23
119.75
491.23
119.75
+0 B
+0 B
WebGPU 700.07
189.13
700.21
189.16
+142 B
+28 B
WebGPU Nodes 649.27
176.49
649.41
176.52
+142 B
+28 B

@Mugen87 Mugen87 added this to the r184 milestone Feb 26, 2026
@Mugen87 Mugen87 merged commit 7e290dd into mrdoob:dev Feb 26, 2026
10 checks passed
@sunag

sunag commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

This PR broken the webgpu_volume_lighting_traa example.

@Mugen87

Mugen87 commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

Side note: We need to make more WebGPU examples work with E2E tests.

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