Просмотр исходного кода

Call Texture.onUpdate() after mipmap generation instead of before, in WebGPU (#31752)

Berthur 7 месяцев назад
Родитель
Сommit
bcbf0311db

+ 2 - 0
src/renderers/common/Textures.js

@@ -308,6 +308,8 @@ class Textures extends DataMap {
 
 					if ( options.needsMipmaps && texture.mipmaps.length === 0 ) backend.generateMipmaps( texture );
 
+					if ( texture.onUpdate ) texture.onUpdate( texture );
+
 				}
 
 			} else {

+ 0 - 2
src/renderers/webgpu/utils/WebGPUTextureUtils.js

@@ -512,8 +512,6 @@ class WebGPUTextureUtils {
 
 		textureData.version = texture.version;
 
-		if ( texture.onUpdate ) texture.onUpdate( texture );
-
 	}
 
 	/**

粤ICP备19079148号