소스 검색

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 => {