Hello,
I am in the process of upgrading from Babylon.js 6 to 9, but I am having some problems with invisible meshes. I recreated the issue here: Adding shadow caster | Babylon.js Playground
In the v6.49 playground, the meshes remain visible and the framerate is smooth. The issue only shows up in v7+. I was able to workaround this issue with engine.getCaps().parallelShaderCompile = undefined;, but the framerate issue still exists.
Hi @jarredcm
I may be misunderstanding what’s happening here, but it looks like there could be two separate issues.
The invisible meshes seem related to shader compilation changes introduced in Babylon.js 7, since setting:
engine.getCaps().parallelShaderCompile = undefined;
makes them visible again.
The FPS drop, however, might be a different issue. In the repro, all meshes are being disposed and recreated every frame - Remove this lines:
scene.onBeforeRenderObservable.add(function () {
disposeAllWalls();
createAllWalls();
});
and each new mesh is re-added as a shadow caster:
shadowGen.addShadowCaster(w);
so I wonder whether the performance impact is coming from that workflow rather than from the visibility issue itself.
I dispose and recreate the mesh there because its similar to how some of the meshes are created in our app. Were still working on optimizations, but its a slow process and I was hoping to get Babylon.js v9 up and running sooner.