Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow acne on DirectionalLight3D when shadow blur set to 0 #103165

Open
SoloRobo opened this issue Feb 22, 2025 · 2 comments · May be fixed by #103538
Open

Shadow acne on DirectionalLight3D when shadow blur set to 0 #103165

SoloRobo opened this issue Feb 22, 2025 · 2 comments · May be fixed by #103538

Comments

@SoloRobo
Copy link

Tested versions

  • Reproducable in v4.4.beta4.official [93d2706] and v4.4.rc1.official [8ed125b]

System information

Godot v4.4.rc1 - Fedora Linux 41 (Workstation Edition) on Wayland - Wayland display driver, Single-window, 1 monitor - Vulkan (Forward+) - integrated AMD Radeon 780M (RADV GFX1103_R1) - AMD Ryzen 7 7840U w/ Radeon 780M Graphics (16 threads)

Issue description

On a DirectionalLight3D setting shadow blur to 0 causes visible dithering

Image

Image

Steps to reproduce

Create a simple scene as attached below.

Camera3d
CSGBox
DirectionalLight3D

Enable shadows on DirectionalLight3D, reduce shadow blur to 0, rotate CSGBox until dithering can be seen on Camera preview.

Minimal reproduction project (MRP)

mrp-44.zip

@AThousandShips
Copy link
Member

Can confirm, also occurs on 4.3.stable

@Calinou Calinou changed the title Visible Dithering on DirectionalLight3D when shadow blur set to 0 Shadow acne on DirectionalLight3D when shadow blur set to 0 Mar 3, 2025
@Calinou
Copy link
Member

Calinou commented Mar 3, 2025

This is not dithering but shadow acne due to shadow bias being too low. Shadow bias is automatically adjusted according to shadow blur to give a good result out of the box, but we should clamp the lower bound for automatic adjustment to something like 0.05. SpotLight3D has the same issue, but not OmniLight3D.

Setting shadow blur to 0.01 mostly avoids the issue, and setting it to 0.05 avoids it completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: For team assessment
Development

Successfully merging a pull request may close this issue.

3 participants