I’m adding glow effect, but materials in my case are loaded dynamically by some config files.
And in Babylon.js Playground, it gets block to register onBeforeRenderMeshToEffect.
So I can get that block after build (onBuildObservable), but cannot know it has been built then get the block directly.
After fiddle the source, I find there is a _buildWasSuccessful in NodeMaterial:
I’d like to expose this property, as .isBuilt or something like that.
However there’s a short circuit if in NodeMaterial's parent PushMaterial.isReady:
If it’s called without mesh, it always returns false. Is it intended?
Shouldn’t it be true after built?
And how can I get build state?
Thanks for your clarification!
It’s a little bit out of my sense I will dig into the code to understand them better.
Besides, I notice that mesh.dispose leaves its uniqueId in glowLayer._meshesUsingTheirOwnMaterials. Is it my duty to call unReferenceMeshFromUsingItsOwnMaterial before dispose the mesh?