Skip to content

Mobile renderer: Angular Distance (PCSS) does not work with DirectionalLight3D shadows #55882

@Calinou

Description

@Calinou

Godot version

4.0.dev (2a9dd65)

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 470.74)

Issue description

Angular Distance (PCSS) does not work as expected with directional light shadows. It is not completely ignored, as the shadowmap is still adjusted accordingly.

Vulkan Clustered backend (working)

simplescreenrecorder-2021-12-12_22.44.15.mp4

Vulkan Mobile backend (broken)

simplescreenrecorder-2021-12-12_22.42.43.mp4

On point lights, adjusting Size while using the Vulkan Mobile backend works as expected:

simplescreenrecorder-2021-12-12_22.46.16.mp4

Steps to reproduce

  • Add several MeshInstance3D nodes so you can see shadows being casted.
  • Add a DirectionalLight3D node. Enable shadows on it.
  • Add an OmniLight3D and SpotLight3D node. Enable shadows on them.
  • Select the DirectionalLight3D and increase Angular Distance slowly. Notice how shadows become blurrier the further away they are from the caster.
  • Select the OmniLight3D and SpotLight3D, and increase Size (not Range) slowly. Notice how shadows become blurrier the further away they are from the caster.
  • Switch to Vulkan Mobile backend in the project settings (search for back end).
    • Note: The MRP linked below already uses the Vulkan Mobile backend by default.
  • Notice that changing Angular Distance on DirectionalLight3D no longer makes the shadows progressively blurrier the further away they get from the object casting them. Shadows will however become more pixelated as the angular distance increases.
    • However, point light shadows remain correct.

Minimal reproduction project

test_vulkan_clustered_vs_mobile_lights.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions