Currently I’m using a shadow generator to create a shadow map for my static map.
After all meshes have been created, each one of them is added as a shadow caster.
After that, I’m setting the refresh rate of the ShadowGenerator to REFRESHRATE_RENDER_ONCE, since I do not need to re-render the shadow map for my static scene anymore.
Now to my actual question; there is a little bit of a delay until the shadow map is actually visible after freezing the refresh rate (since the mapSize param is 4000).
How would I be able to make a callback or check if the shadow map has been fully created/rendered?
Using onAfterShadowMapRenderObservable to check if the shadow map has been applied, did not help much, since it still triggered before the shadow map was visible.
–
PG: https://playground.babylonjs.com/#CWJPSP#1
^ Im using alert to see if the shadow map is visible yet in the scene.
In this case, it’s not, and only after dismissing the shadow map is visible
Tagging @Evgeni_Popov