Explorar o código

WebGPUTextures: Honor premultiplyAlpha when creating ImageBitmap.

Mugen87 %!s(int64=4) %!d(string=hai) anos
pai
achega
a21d08273f
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      examples/jsm/renderers/webgpu/WebGPUTextures.js

+ 1 - 0
examples/jsm/renderers/webgpu/WebGPUTextures.js

@@ -241,6 +241,7 @@ class WebGPUTextures {
 				const options = {};
 
 				options.imageOrientation = ( texture.flipY === true ) ? 'flipY' : 'none';
+				options.premultiplyAlpha = ( texture.premultiplyAlpha === true ) ? 'premultiply' : 'default';
 
 				createImageBitmap( image, 0, 0, width, height, options ).then( imageBitmap => {