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

fix:Unable to set the correct unpackAlignment when cubeTexture is set to dataTexture

zouzouzou11 5 лет назад
Родитель
Сommit
f0f59b6cc2
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      src/renderers/webgl/WebGLTextures.js

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

@@ -712,6 +712,8 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 		const isCompressed = ( texture && ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture ) );
 		const isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture );
+		
+		if ( texture.image[ 0 ] ) _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, texture.image[ 0 ].unpackAlignment);
 
 		const cubeImage = [];
 

粤ICP备19079148号