Topic was automatically imported from the old Question2Answer platform.
Asked By
Yvan
In a 3D scene, I tried to put 2 directional lights with the shadows activated.
Each works well separately (i see the shadows), but as soon as both are visible, only the shadows of the first directional light in the scene tree are visible.
Is this normal ?
PS I did not find in the documentation (maybe I searched wrong…) anything indicating that the number of directional lights was limited.
Cross-posting my answer from Godot forums for posterity:
Godot 3.x only supports one DirectionalLight with shadows at a time.
In Godot 4.0, using more than 1 DirectionalLight will always have a significant performance impact, especially if shadows are enabled on more than 1 DirectionalLight. Doing so will also worsen shadow quality, as the shadow map texture will have to be shared for multiple DirectionalLights.
As a conclusion, in Godot 4.0, even if it doesn’t look physically accurate for your game, I strongly recommend sticking to 1 DirectionalLight for best performance and quality.
PS: OmniLights with shadows are not intended to be used as a replacement for DirectionalLights. You could increase the shadow atlas size (or use a distant SpotLight instead), but it will never look ideal since there is only one shadow “split” to speak of.