ソースを参照

fixed regression due to 4caaf049371b949c8312de239e7e783da6cb52f1 - ensure that variables are correctly mapped in vertex shader

Nicolas Cannasse 6 年 前
コミット
726e462bb8
1 ファイル変更10 行追加0 行削除
  1. 10 0
      hxsl/Splitter.hx

+ 10 - 0
hxsl/Splitter.hx

@@ -41,6 +41,16 @@ class Splitter {
 			default:
 			default:
 				throw "assert";
 				throw "assert";
 			}
 			}
+
+		// perform a first mapVars before we map fragment shader vars		
+		vfun = {
+			ret : vfun.ret,
+			ref : vfun.ref,
+			kind : vfun.kind,
+			args : vfun.args,
+			expr : mapVars(vfun.expr),
+		};
+
 		for( inf in Lambda.array(vvars) ) {
 		for( inf in Lambda.array(vvars) ) {
 			var v = inf.v;
 			var v = inf.v;
 			switch( v.kind ) {
 			switch( v.kind ) {