Calling shadowGenerator.getShadowMap().resize(newShadowMapSize)
to resize a shadowmap does not work, as demonstrated in the playground below.
https://playground.babylonjs.com/#PRK3XX#2
In the playground, press the Space key once the scene is loaded to attempt to resize a shadowmap. It does not work - the shadow disappears.
In other cases, where the shadow-casting-mesh may be larger, the shadow is still there, but is however smaller and not the right size for the mesh.
Cedric
July 25, 2019, 8:29pm
2
Hi
I could reproduce the issue with Chrome and Firefox. No errors or any log in the console. Anyways, I’m taking a look.
1 Like
Cedric
July 25, 2019, 9:34pm
3
It works with webgl1 but not with webgl2. pinging @sebavan
Yup looks like a bug as the light UBOs are not flagged as dirty the new size info are not passed through the shader. I should have a fix by tomorrow morning.
1 Like
It is already tomorrow in France so I pushed the fix here: Fix RTT resize and ShadowGenerator by sebavan · Pull Request #6627 · BabylonJS/Babylon.js · GitHub It will be part of the next nightly tomorrow.
1 Like