Godot Version
3.6
Question
See the attached video. Why does the directional light shadow (orthogonal mode, depth range optimized) behave like this?
As the camera moves closer, shadows first fade in (as is expected) but then they disappear (fade out) . Other scene geometry or light/shadow properties does not change during this. And when the camera moves just a little bit closer or further as the player walks around, the shadows blinks on and off.
I’m guessing this is caused by the shadow map depth range getting adjusted under the hood but I don’t understand why it causes so drastic change with such a small change in camera position (and no other changes in the scene).
What is happening here and how can I fix it?
Changing to “stable” depth range fixes the blinking issue but results in very bad shadow quality. As far as I understand the “optimized” depth range should work better in a scene like this.