Skip to content

Commit 3792901

Browse files
authored
WebGPUBackground: Ensure clear color is alpha premultiplied. (#23853)
1 parent 73810cb commit 3792901

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/jsm/renderers/webgpu/WebGPUBackground.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class WebGPUBackground {
5757

5858
if ( renderer.autoClearColor === true ) {
5959

60+
_clearColor.multiplyScalar( _clearAlpha );
61+
6062
colorAttachment.clearValue = { r: _clearColor.r, g: _clearColor.g, b: _clearColor.b, a: _clearAlpha };
6163
colorAttachment.loadOp = GPULoadOp.Clear;
6264
colorAttachment.storeOp = GPUStoreOp.Store;

0 commit comments

Comments
 (0)