Skip to content

WebGPUBackend: Reuse clear color instance.#33189

Merged
Mugen87 merged 1 commit intomrdoob:devfrom
Mugen87:dev6
Mar 16, 2026
Merged

WebGPUBackend: Reuse clear color instance.#33189
Mugen87 merged 1 commit intomrdoob:devfrom
Mugen87:dev6

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Mar 16, 2026

Related issue: -

Description

While investigating an issue I've noticed the WebGPU backend creates clear value objects for the render pass descriptors over and over again instead of just reusing an instance.

@Mugen87 Mugen87 added this to the r184 milestone Mar 16, 2026
@github-actions
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.97
85.54
359.97
85.54
+0 B
+0 B
WebGPU 631.03
175.09
631.1
175.11
+63 B
+22 B
WebGPU Nodes 629.15
174.81
629.21
174.83
+63 B
+21 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 492.17
120.12
492.17
120.12
+0 B
+0 B
WebGPU 703.46
189.94
703.53
189.96
+63 B
+17 B
WebGPU Nodes 652.69
177.33
652.75
177.35
+63 B
+20 B

@Mugen87 Mugen87 merged commit 559deba into mrdoob:dev Mar 16, 2026
10 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.

1 participant