Selaa lähdekoodia

WebGPUTextures: Honor premultiplyAlpha when creating ImageBitmap.

Mugen87 4 vuotta sitten
vanhempi
commit
a21d08273f
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  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 = {};
 				const options = {};
 
 
 				options.imageOrientation = ( texture.flipY === true ) ? 'flipY' : 'none';
 				options.imageOrientation = ( texture.flipY === true ) ? 'flipY' : 'none';
+				options.premultiplyAlpha = ( texture.premultiplyAlpha === true ) ? 'premultiply' : 'default';
 
 
 				createImageBitmap( image, 0, 0, width, height, options ).then( imageBitmap => {
 				createImageBitmap( image, 0, 0, width, height, options ).then( imageBitmap => {