I came across an issue where animating materials wasn’t working consistently cross-browser. I distilled it down to the basics with this playground snippet. The red color of the sphere changes as expected in Chrome but doesn’t change with Safari. If I get rid of the performance priority line it changes in both. I’d expect identical behavior in both browsers. Any idea what might be happening here? Also, any thoughts on how to update the material color with the performance priority set to immediate in a way that works cross-browser?
* Freeze materials when they are ready. If you need to change something on a material,
you will have to call `material.unfreeze()`, do your changes, and then call `material.freeze()` again
The reason it doesn’t change is because Intermediate mode freezes materials
Material._checkScenePerformancePriority is called by isReadyForSubMesh when the material is not frozen, that’s why the “frozen” state is reset back each time you call unfreeze.
Instead of calling unfreeze you should call markDirty(true):
I will see to update the doc accordingly when tackling the issue you linked to.