I see in the 4.0 what’s new that we now have a onBeforeShadowMapRenderObservable, which is great.
So I was wondering, has getting very deep black shadows - especially in gltf workflow - could be impossible, if we can be able to use this to turn all scene to black/every-color-you-need just before shadows rendering, then come back to normal render.
I don’t know if this could even works, and it seems a little overkill for the performances but I tried it anyway:
- the cornell box example with yellow shadows: Babylon.js Playground
- a simpler example: https://playground.babylonjs.com/#I8TW2J#4
In both playgrounds I want yellow shadows, and I use scene.ambientColor for that, but I need my ambientColor back to normal when shadow computation is done, that’s why I’m talking about onAfterShadowMapRenderObservable.
Also… maybe the way I want to to this is totally wrong?
PS: the already existing onBeforeShadowMapRenderObservable is still not in the doc/api.