-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Shadows can only be visible from one direction and cannot be visible from another direction.
It seems like Shadow frustum orientation only locked to the directional light's rotation. or some values of the directional light has strange issue. Not sure exactly what is wrong, But my guess is, Directional Light's shadow bound gizmos are not big enough so since its targeting the scene camera it cut shorts on the opposite side of the light direction.
Shadows can be seen from very long distance:

Almost about same distance away but now the light is behind the camera:

ShadowFrustum03.mp4
Here I tried to explain the issue how I think it is happening. When the camera is looking away from the direction of the light, it only see the area that shadow casting boundary doesn't reaches. No matter how big number you put on your distance from layer's camera and shadows frustum size this issue still persist. I guess we need couple extra settings to fix this type of issue for rendering far shadows
as it can be seen on this example finding the perfect sweet spot is not easy
https://threejs.org/examples/webgl_shadowmap_csm
But if more options given for directional light, user can find the sweet spot for their game's need. Also without visualization of the light and shadows boundaries it might be hard setup, but personally it is always better to have all the options of the lights sources that threejs gives us.
Steps to reproduce
Example Project:
Shadow Frustum Test.zip
GDevelop platform
Desktop
GDevelop version
5.5.244
Platform info
OS Windows
Additional context
No response
