Skip to content

WebGLBackend: Fix clear() with a disabled color write mask. - #34729

Merged
Mugen87 merged 4 commits into
mrdoob:devfrom
drakeo338:claude/34728-fix
Oct 1, 2026
Merged

Mugen87 merged 4 commits into
mrdoob:devfrom
drakeo338:claude/34728-fix

Conversation

@drakeo338

Copy link
Copy Markdown
Contributor

Related issue: #34728

Description

Fixes #34728. On the WebGL2 backend of WebGPURenderer, WebGLBackend.clear() re-enabled the depth and stencil write masks but not the color one, so after a draw with colorWrite: false the next color clear was masked out and the render target kept its old content. The change calls setColorMask( true ) before clearing color, and adds a regression test that fails without it.

@Mugen87 Mugen87 added this to the r187 milestone Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
Core 390.08
102.3
390.08
102.3
+0 B
+0 B
WebGL 372.73
87.14
372.73
87.14
+0 B
+0 B
WebGPU 428.77
115.55
428.8
115.55
+31 B
+6 B
WebGPU Nodes 716.44
196.86
716.47
196.86
+31 B
+5 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 517.46
124.27
517.46
124.27
+0 B
+0 B
WebGPU 769.05
206.07
769.08
206.08
+31 B
+5 B
WebGPU Nodes 714.9
192.6
714.93
192.61
+31 B
+7 B

@Mugen87
Mugen87 merged commit 3a6da8d into mrdoob:dev Oct 1, 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.

WebGPU renderer - WebGLBackend: color clear is ignored after a draw with colorWrite: false

2 participants