|
|
@@ -245,6 +245,12 @@ class WebGLTextureUtils {
|
|
|
|
|
|
const { gl, extensions, backend } = this;
|
|
|
|
|
|
+
|
|
|
+ gl.pixelStorei( gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );
|
|
|
+ gl.pixelStorei( gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );
|
|
|
+ gl.pixelStorei( gl.UNPACK_ALIGNMENT, texture.unpackAlignment );
|
|
|
+ gl.pixelStorei( gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE );
|
|
|
+
|
|
|
gl.texParameteri( textureType, gl.TEXTURE_WRAP_S, wrappingToGL[ texture.wrapS ] );
|
|
|
gl.texParameteri( textureType, gl.TEXTURE_WRAP_T, wrappingToGL[ texture.wrapT ] );
|
|
|
|
|
|
@@ -333,11 +339,6 @@ class WebGLTextureUtils {
|
|
|
|
|
|
backend.state.bindTexture( glTextureType, textureGPU );
|
|
|
|
|
|
- gl.pixelStorei( gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );
|
|
|
- gl.pixelStorei( gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );
|
|
|
- gl.pixelStorei( gl.UNPACK_ALIGNMENT, texture.unpackAlignment );
|
|
|
- gl.pixelStorei( gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE );
|
|
|
-
|
|
|
this.setTextureParameters( glTextureType, texture );
|
|
|
|
|
|
if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) {
|
|
|
@@ -426,6 +427,8 @@ class WebGLTextureUtils {
|
|
|
|
|
|
this.backend.state.bindTexture( glTextureType, textureGPU );
|
|
|
|
|
|
+ this.setTextureParameters( glTextureType, texture );
|
|
|
+
|
|
|
if ( texture.isCompressedTexture ) {
|
|
|
|
|
|
const mipmaps = texture.mipmaps;
|