Hi guys!
Have a look at this PG:
It still allows to change the emissiveColor
even if the material is frozen, albedoColor
is not changeable. (on PC).
On MAC/Chrome it allows to change the albedoColor
as well.
Thank you!
Hi guys!
Have a look at this PG:
It still allows to change the emissiveColor
even if the material is frozen, albedoColor
is not changeable. (on PC).
On MAC/Chrome it allows to change the albedoColor
as well.
Thank you!
This works for the emissive color because it is used by the glow layer, which is not affected by the material freezing.
It doesn’t work for normal material because when a material is frozen, you can’t update its properties, or most of them (that’s the point of freezing to avoid running code to gain performance).
We have an open issue with better handling of frozen materials, which will allow you to use material.markDirty(true)
to make the color change take effect (which makes this PG work). At this point, it’s best to temporarily unfreeze, make the change, and freeze again after a few milliseconds, to give the system time to update the underlying uniform buffer.
This works on the Mac because uniform buffers are not supported, so the update code is always executed in this case. You can simulate this by setting engine.disableUniformBuffers = true
on PC.