Skip to content

Commit 2d6bf90

Browse files
authored
WebGPUPipelineUtils: Fix blending with premultiplied alpha. (#29100)
* WebGPUPipelineUtils: Fix additive blending with premultiplied alpha. * WebGPUPipelineUtils: Fix normal blending as well.
1 parent 9b6e790 commit 2d6bf90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/renderers/webgpu/utils/WebGPUPipelineUtils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,11 @@ class WebGPUPipelineUtils {
280280
switch ( blending ) {
281281

282282
case NormalBlending:
283-
setBlend( GPUBlendFactor.SrcAlpha, GPUBlendFactor.OneMinusSrcAlpha, GPUBlendFactor.One, GPUBlendFactor.OneMinusSrcAlpha );
283+
setBlend( GPUBlendFactor.One, GPUBlendFactor.OneMinusSrcAlpha, GPUBlendFactor.One, GPUBlendFactor.OneMinusSrcAlpha );
284284
break;
285285

286286
case AdditiveBlending:
287-
setBlend( GPUBlendFactor.SrcAlpha, GPUBlendFactor.One, GPUBlendFactor.One, GPUBlendFactor.One );
287+
setBlend( GPUBlendFactor.One, GPUBlendFactor.One, GPUBlendFactor.One, GPUBlendFactor.One );
288288
break;
289289

290290
case SubtractiveBlending:

0 commit comments

Comments
 (0)