Material block-dirty mechanism (#13074)
Material block-dirty mechanism (#13074)

* Material block-dirty mechanism

* update function name

* make sure the state is preserved even if callback throws.
BabylonJS/Babylon.js,BabylonJS/Babylon.js,RaananW/Babylon.js,BabylonJS/Babylon.js,RaananW/Babylon.js,sebavan/Babylon.js,sebavan/Babylon.js,RaananW/Babylon.js,sebavan/Babylon.js