Prechádzať zdrojové kódy

WebGLTextures: Fix video texture check. (#23271)

Michael Herzog 3 rokov pred
rodič
commit
e389623d48
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      src/renderers/webgl/WebGLTextures.js

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

@@ -1631,13 +1631,13 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 		const format = texture.format;
 		const type = texture.type;
 
-		if ( texture.isCompressedTexture === true || texture.format === _SRGBAFormat ) return image;
+		if ( texture.isCompressedTexture === true || texture.isVideoTexture === true || texture.format === _SRGBAFormat ) return image;
 
 		if ( encoding !== LinearEncoding ) {
 
 			// sRGB
 
-			if ( encoding === sRGBEncoding && texture.isVideoTexture !== true ) {
+			if ( encoding === sRGBEncoding ) {
 
 				if ( isWebGL2 === false ) {