I have read the newly released documentation however, I couldn’t make the unfreezing the materials work with any of the performance modes.
I’m trying to change the alpha of the material when performance mode is set however, I couldn’t change any attribute of the material. Also, when inspected from console the isfrozen function always returns true.
It works in your PG example only because the ground has a standard material: the sphere and the ground do not use the same effect underneath, that’s why it works. This PG does not work with PBR materials: https://www.babylonjs-playground.com/#EPI4MZ#12
The way to make it work is to reset to Backward mode, unfreeze the material and re-set Intermediate mode in the next frame, to give the system time to update the material properly:
The fact that you have to wait until the material was rendered was an issue for me several times already. How to be really sure that a material was really updated/rendered? For example if the corresponding mesh is currenty not inside the frustum. Some kind of autoFreezeAfterUpdated flag would be nice.
Yes, that’s what material.markDirty(true) is for normally, but it does not work in all cases currently. We need to improve on this one so that it will also work in your case.