Jelajahi Sumber

fixed renamed vars in batch shaders forced perinstance

Nicolas Cannasse 2 tahun lalu
induk
melakukan
b9ca9fd58d
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      hxsl/Cache.hx

+ 2 - 2
hxsl/Cache.hx

@@ -690,9 +690,9 @@ class Cache {
 			params = p2;
 		}
 
-		inline function isPerInstance(p:RuntimeShader.AllocParam,v) {
+		inline function isPerInstance(p:RuntimeShader.AllocParam,v:TVar) {
 			var params = instancedParams[p.instance];
-			if( params != null && params.indexOf(p.name) >= 0 )
+			if( params != null && params.indexOf(v.name) >= 0 )
 				return true;
 			if( this.isPerInstance(v) )
 				return true;