Skip to content

WebGPURenderer: Fix unsupported texture sample counts#33722

Merged
sunag merged 2 commits into
mrdoob:devfrom
sunag:dev-msaa
Jun 5, 2026
Merged

WebGPURenderer: Fix unsupported texture sample counts#33722
sunag merged 2 commits into
mrdoob:devfrom
sunag:dev-msaa

Conversation

@sunag

@sunag sunag commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Related issue: --

Description

This PR fixes a GPUValidationError in WebGPURenderer when setting a texture or render target's sample count to unsupported values (e.g. 3 or any value other than 1 or 4).

Additionally, the webgpu_multisampled_renderbuffers example has been updated to use a simpler boolean switch (multisampling) in the GUI instead of a slider with numbers, as intermediate sample numbers are not natively supported by WebGPU.

@sunag sunag changed the title WebGPURenderer: Normalize texture samples and update multisampled renderbuffers example WebGPURenderer: Normalize texture samples and fix multisampled renderbuffers example Jun 5, 2026
@sunag sunag added this to the r185 milestone Jun 5, 2026
@sunag sunag marked this pull request as ready for review June 5, 2026 00:35
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 365.48
86.83
365.48
86.83
+0 B
+0 B
WebGPU 660.11
182.73
660.13
182.74
+21 B
+3 B
WebGPU Nodes 658.15
182.43
658.17
182.44
+21 B
+4 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 507.14
123.31
507.14
123.31
+0 B
+0 B
WebGPU 738.73
198.85
738.75
198.85
+21 B
+5 B
WebGPU Nodes 687.95
186.19
687.97
186.22
+21 B
+30 B

@sunag sunag changed the title WebGPURenderer: Normalize texture samples and fix multisampled renderbuffers example WebGPURenderer: Fix unsupported texture sample counts and multisampled renderbuffers example Jun 5, 2026
@sunag sunag changed the title WebGPURenderer: Fix unsupported texture sample counts and multisampled renderbuffers example WebGPURenderer: Fix unsupported texture sample counts Jun 5, 2026
@sunag sunag merged commit b174d0e into mrdoob:dev Jun 5, 2026
10 checks passed
@sunag sunag deleted the dev-msaa branch June 5, 2026 00:58
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