Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPURenderer: Harmonize clear of MRT textures. #30586

Merged
merged 2 commits into from
Feb 23, 2025
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Feb 22, 2025

Fixed #30567.

Description

The PR harmonizes how MRT render targets are cleared in WebGPURenderer.

Until it is possible to define clear values for each color attachment, the clear color is now only applied to the beauty attachment (the default color attachment). All others are using 0, 0, 0, 1 which is already the default in the WebGPU backend when a clear operation happens in beginRender().

Copy link

github-actions bot commented Feb 22, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.65
78.39
336.65
78.39
+0 B
+0 B
WebGPU 522.23
144.94
522.37
144.98
+134 B
+37 B
WebGPU Nodes 521.7
144.84
521.83
144.88
+134 B
+41 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.64
112.24
465.64
112.24
+0 B
+0 B
WebGPU 592.61
160.56
592.74
160.6
+134 B
+37 B
WebGPU Nodes 547.74
150
547.87
150.04
+134 B
+36 B

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Feb 22, 2025

Now the webgpu_multiple_rendertargets* examples are rendered consistently across WebGPU and WebGL 🎉 .

@Mugen87 Mugen87 marked this pull request as ready for review February 22, 2025 11:00
@Mugen87 Mugen87 added this to the r174 milestone Feb 22, 2025
@Mugen87 Mugen87 merged commit bcae459 into mrdoob:dev Feb 23, 2025
12 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.

WebGPURenderer: Clear of MRT render targets executed differently in WebGL and WebGPU backend.
1 participant