Hersir Posted July 6, 2018 Share Posted July 6, 2018 Hi, was messing with material freeze, and found behaviour that I haven't thought about. If material is set to `checkReadyOnlyOnce = true` inside babylon file, and lights are added after that material is ready. Light will not be added to material, what is logical as material is frozen. Here is PG with that behaviour. So in this case ,every time light is add / removed, switched of / on or animated I need to loop through all materials on scene and if `checkReadyOnlyOnce = true` to force update using `markDirty()`. Just thinking if that could be done automatically by engine without breaking optimisation of freeze or its better to do on project side Quote Link to comment Share on other sites More sharing options...
Arte Posted July 6, 2018 Share Posted July 6, 2018 Hi @Hersir How about scene.registerBeforeRender??? http://www.babylonjs-playground.com/#JI6GDR#1 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 6, 2018 Share Posted July 6, 2018 Also freezing a material is no more a big deal. We introduced several optimizations lately that could allow you to not freeze materials but still get the same perf Quote Link to comment Share on other sites More sharing options...
Hersir Posted July 10, 2018 Author Share Posted July 10, 2018 @Deltakosh thanks for info Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.