Browse Source

CacheFile : Skip duplicate runtime shader instead of throw

TothBenoit 1 week ago
parent
commit
dfb0738683
1 changed files with 4 additions and 1 deletions
  1. 4 1
      hxsl/CacheFile.hx

+ 4 - 1
hxsl/CacheFile.hx

@@ -332,7 +332,10 @@ class CacheFile extends Cache {
 					throw "assert";
 				}
 				var rt2 = rttMap.get(r.specSign);
-				if( rt2 != null ) throw "assert";
+				if( rt2 != null ) {
+					log("Duplicate runtime shader found");
+					continue;
+				}
 				runtimeShaders.push(rt);
 				rttMap.set(r.specSign, { rt : rt, shaders : shaderList });
 			}