瀏覽代碼

[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 1 月之前
父節點
當前提交
525653c219
共有 1 個文件被更改,包括 1 次插入1 次删除
  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();