Mesh disappear when add animation event

I have a playground here AnimationGroup demo | Babylon.js Playground (babylonjs.com)

I tried to change the texture of the mesh during specific animation frame, when I hit play, I can see when new material added, the mesh also flashes and disappear for a second, is there any way to solve this? Thanks.

You could force the compilation of the material shaders to ensure everything is ready when you render: https://playground.babylonjs.com/#CBGEQX#1088

2 Likes

Thank you @sebavan , that’s very helpful