Quellcode durchsuchen

[MeshBatch] Ignore unknown passes instead of throwing error

For some reason, trying to try/catch this with outside code leads to graphical glitches in the rendering. See this post for more details : https://shirogames.slack.com/archives/C87HJHY7R/p1754389502152609
Clément Espeute vor 1 Monat
Ursprung
Commit
525653c219
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      h3d/scene/MeshBatch.hx

+ 1 - 1
h3d/scene/MeshBatch.hx

@@ -156,7 +156,7 @@ class MeshBatch extends MultiMaterial {
 			var matStart = prim.getMaterialIndexStart(index);
 			for( p in mat.getPasses() ) @:privateAccess {
 				var ctx = scene.renderer.getPassByName(p.name);
-				if( ctx == null ) throw "Could't find renderer pass "+p.name;
+				if( ctx == null ) continue;
 
 				var output = ctx.output;
 				var shaders = p.getShadersRec();