Hello, BabylonJS community,
It has been a while since I haven’t posted here and it feels like I am reaching a friend to know what’s up!
The reason I didn’t post is because on the whole BabylonJS works perfectly well!
As a matter of fact, the question which brings me here is a more curiosity question:
I have been playing with shaders a lot recently and I started trying to optimize them. The first obvious thing which came to my mind was to freeze the material once there is no more float or texture values to change in the shader.
But doing some tests I found out that I could still change values after the freeze as you can see in this playground ligne 60-62: https://playground.babylonjs.com/#00ST2S#6. Is it normal?
As shaders are already so performant (for my use case at least) is it interesting to actually freeze it?
And otherwise what would be the best practice to optimize the shader except having an optimized glsl shader code?
In advance, thanks for your answers and ideas!