Hello! I’ve been working with godot for the past few months and, so far everything has gone swimmingly. Up until now.
See, while prototyping a day/night cycle, I discovered that just before/after sunset, the light from the sun leaks right through all geometry in the scene.
Worth noting, this whole scene is on top of a floating island. I doubt that it would affect the lighting, as most scenes are basically floating islands anyway, but I’m also fairly new to Godot, and want to make sure I’m covering my bases here.
Now, I can “fix” this by disabling angular distance, and thus, blur- however, the quality and jaggedness of these unblurred shadows is extremely jarring. The end result doesn’t fit with the art style at all, and I wish to avoid it at all costs.
I have tried, without exaggeration, everything I can think of.
I have tweaked and moved every setting the directional light has.
I have searched google, multiple forum posts, and youtube, for over three hours.
I even went as far as to place a large plane in front of the sun, in a dire hope that it would block this damned light from leaking through.
Nothing has worked.
I have included what I believe to be all relevant screenshots, both of the DL node itself, and of the scene.
I sincerely hope that this is simply the result of me missing something stupid. If not, are there any workarounds or plugins that improve the quality/reliability of the shadows?
Either way, I appreciate the help.
that’s normal. Godot uses shadow buffers for shadows, when the light is almost parallel to the ground, the amount of geometry that needs to fit in the buffer is too much and can lead to these glitches. This is also related to the splits used by the sun to render at different distances from the camera. Distant or large objects tend to display these issues.
I think angular distance uses these splits to create the blur effect, so that would be a reason why this happens.
could you show us which direction the sun is looking at? The terrain needs a mesh below it to block light because it’s a flat plane with backfaces culled. This could be as simple as that when the sun is in the “night” position, this can lead to light leaking throw the ground.
solutions
1 - try increasing shadow quality and/or shadow atlas size in project settings, this could solve the problem. Also try changing the splits distances in directional shadow (in directional light).
2 - TAA can fix the extreme dither of shadows when using high levels of blur or adjusting BIAS, you can decrease BIAS to lower than 0.1 (like 0.01) to try to fix the issue and this will create an ugly look, and TAA can fix that. but TAA is heavy and leads to “the unreal look” where objects display smearing glitches.
You can enable TAA from project settings.
Hello! Thank you, it appears that enabling TAA fixed it… somehow. The shadows started projecting properly again, even with blur. It’s the strangest thing, I’d been fiddling with it for hours and nothing had worked.
Either way, thank you!