Skip to content

WebGPURenderer: Honor Texture.premultiplyAlpha in WebGPU backend.#31157

Merged
Mugen87 merged 1 commit intomrdoob:devfrom
Mugen87:dev1
May 24, 2025
Merged

WebGPURenderer: Honor Texture.premultiplyAlpha in WebGPU backend.#31157
Mugen87 merged 1 commit intomrdoob:devfrom
Mugen87:dev1

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented May 24, 2025

Related issue: #31132

Description

The PR makes sure Texture.premultiplyAlpha is honored in the WebGPU backend for all image based textures. That aligns the behavior to the WebGL backend which already supported the flag similar to WebGLRenderer.

The PR also removes an unused method in WebGPUTextureUtils.

@github-actions
Copy link

github-actions bot commented May 24, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.26
78.64
337.26
78.64
+0 B
+0 B
WebGPU 551.04
152.81
551.02
152.82
-12 B
+8 B
WebGPU Nodes 550.39
152.66
550.38
152.66
-12 B
+8 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 468.44
113.28
468.44
113.28
+0 B
+0 B
WebGPU 626.05
169.5
626.03
169.47
-20 B
-22 B
WebGPU Nodes 580.9
158.82
580.88
158.81
-20 B
-16 B

@Mugen87 Mugen87 added this to the r177 milestone May 24, 2025
@Mugen87 Mugen87 merged commit 7443431 into mrdoob:dev May 24, 2025
12 checks passed
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
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