Skip to content

Large lighting artifacts with cascaded shadows #750

@nicolasgustafsson

Description

@nicolasgustafsson

Describe the bug
When the light is somewhat parallel to the surface it's lighting, you start seeing big circles when zooming in and out.

To Reproduce

  1. Create a new scene
  2. Make sure the main light is casting shadows
  3. Make sure cascaded shadows are enabled
  4. Create a large box
  5. Apply a material with toon shading to that box
  6. Rotate the light parallel to one of the sides of the box
  7. Move back and forth with the camera to see the artifact

Expected behavior
Lighting should remain somewhat consistent when moving between shadow cascades

Screenshots
https://github.com/user-attachments/assets/56a58d5e-77a4-4679-8714-ae3e4b8bd36f

Additional context
I believe this is an issue with shadow attenuation in shader grahps in general, as I can reproduce similar artifacts when making my own custom lighting.

This person has a similar issue:
https://discussions.unity.com/t/custom-lighting-shadow-attenuation/1705978/3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions