Skip to content

Directional Shadows disappear with large Camera Z Far values at some angles #89560

@ashlanderr

Description

@ashlanderr

Tested versions

  • Reproducible in: v4.3.dev5.official [89f70e9]
  • Not Reproducible in: v4.3.dev2.official [3524346], v4.2.1.stable.mono.official [b09f793]

System information

Godot v4.3.dev5 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 31.0.15.3623) - AMD Ryzen 7 2700 Eight-Core Processor (16 Threads)

Issue description

When I set the camera's Z Near to 10m and Z Far to 1,000,000m, shadows from a directional light begin to disappear at certain angles. Reducing the Z Far value to 100,000m resolves the issue. The ratio between the near and far planes is not significantly different from the default values (4000 / 0.05 = 80,000, compared to 1,000,000 / 10 = 100,000), so I think that the problem is unlikely to be related to Z fighting or similar issues.

Small Z Far value:
image

Large Z Far value:
image

Steps to reproduce

In the MRP, toggle the preview between Camera3D_Ok and Camera3D_Error to observe the disappearance of shadows. Additionally, you can adjust the editor camera settings to match those of Camera3D_Error and rotate it to identify angles at which the shadows fail.

Minimal reproduction project (MRP)

ShadowTest1.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Bad

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions