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

WebGLRenderer: Fix `clearLayerUpdates()` call. (#33989)

Michael Herzog 1 неделя назад
Родитель
Сommit
f1db0abea3
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/renderers/webgl/WebGLTextures.js

+ 2 - 2
src/renderers/webgl/WebGLTextures.js

@@ -1065,8 +1065,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 											}
 
-											texture.clearLayerUpdates();
-
 										} else {
 
 											state.compressedTexSubImage3D( _gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, mipmap.data );
@@ -1107,6 +1105,8 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 					}
 
+					if ( texture.layerUpdates.size > 0 ) texture.clearLayerUpdates();
+
 				} else {
 
 					if ( useTexStorage && allocateMemory ) {

粤ICP备19079148号