Przeglądaj źródła

Do not force POT texture for WebGL2

Takahiro 7 lat temu
rodzic
commit
b53cec23cd
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      src/renderers/webgl/WebGLTextures.js

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

@@ -76,6 +76,8 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 
 	function textureNeedsPowerOfTwo( texture ) {
 	function textureNeedsPowerOfTwo( texture ) {
 
 
+		if ( _isWebGL2 ) return false;
+
 		return ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) ||
 		return ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) ||
 			( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter );
 			( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter );