瀏覽代碼

WebGPUTextures: Honor premultiplyAlpha when creating ImageBitmap.

Mugen87 4 年之前
父節點
當前提交
a21d08273f
共有 1 個文件被更改,包括 1 次插入0 次删除
  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 => {