I noticed that when using Intermediate performance mode, my materials aren’t receiving shadows if my shadow casters are all added async.
I figured out that I can mesh.resetDrawCache
to get the shadows to work after adding async casters.
I -think- what’s happening is that materials are freezing and if there isn’t at least 1 registered shadow caster, they freeze without the ability to display shadows.
If you have at least 1 registered shadow caster when the materials compile, then adding other shadow casters async later works fine.
This might be expected behavior for this performance mode, but it seems possible that materials could tell there are lights w/ ShadowGenerators that exist and then freeze with the ability to receive shadows even if nothing is registered to cast a shadow yet.
Here’s a minimal repro:
You can uncomment a synchronous shadow caster and then both sync + async shadow casters will work.