瀏覽代碼

Remove cache from Array of Textures uniforms

Fernando Serrano 6 年之前
父節點
當前提交
92b3f3a6d0
共有 1 個文件被更改,包括 2 次插入14 次删除
  1. 2 14
      src/renderers/webgl/WebGLUniforms.js

+ 2 - 14
src/renderers/webgl/WebGLUniforms.js

@@ -590,17 +590,11 @@ function setValueM4a( gl, v ) {
 
 function setValueT1a( gl, v, textures ) {
 
-	var cache = this.cache;
 	var n = v.length;
 
 	var units = allocTexUnits( textures, n );
 
-	if ( arraysEqual( cache, units ) === false ) {
-
-		gl.uniform1iv( this.addr, units );
-		copyArray( cache, units );
-
-	}
+	gl.uniform1iv( this.addr, units );
 
 	for ( var i = 0; i !== n; ++ i ) {
 
@@ -612,17 +606,11 @@ function setValueT1a( gl, v, textures ) {
 
 function setValueT6a( gl, v, textures ) {
 
-	var cache = this.cache;
 	var n = v.length;
 
 	var units = allocTexUnits( textures, n );
 
-	if ( arraysEqual( cache, units ) === false ) {
-
-		gl.uniform1iv( this.addr, units );
-		copyArray( cache, units );
-
-	}
+	gl.uniform1iv( this.addr, units );
 
 	for ( var i = 0; i !== n; ++ i ) {
 

粤ICP备19079148号