Jump to content

Frozen materials and light update


Hersir
 Share

Recommended Posts

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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...