Skip to content

Shadow atlas size setting does not change resolution #24587

@SavageMcCabbage

Description

@SavageMcCabbage

Godot version: 3.1 alpha 4, also appears in 3.0.6 stable

OS/device including version: Windows 10, GTX 1070ti, NVidia 417.35 Drivers

Issue description:
Changing the shadow atlas size appears to affect the softness of the filtering, rather than increasing the resolution of the shadow.

I've tested the default project quality settings with shadow filtering set to PCF13, using shadow atlas sizes from 512 by 512 to 16384 by 16384. The scene is a cuboid and a plane, with one omni light casting a shadow. It looks like the shadow just gradually loses the effect of the filtering as the resolution increases, rather than increasing the resolution itself.

512 by 512:
512

1024 by 1024:
1024

2048 by 2048:
2048

4096 by 4096:
4096

8192 by 8192:
8192

16384 by 16384:
16384

I can't tell by eye if the resolution is actually changing as expected at the lower resolutions, but it's clear to me that the shadows are exactly the same between 4096, 8192 and 16384, aside from the higher two looking worse due to not having the edges smoothed as much. Currently, it doesn't seem worth it to turn shadows to anything other than somewhere between 2048 or 1024, as those seem to be the best balance between clarity and smooth edges.

Steps to reproduce:

  1. Set shadow filtering to PCF13.
  2. Set shadow atlas resolution to any low power of 2 in project settings, then raise until hitting the max.
  3. Observe how shadow blockiness never changes (aside from being imperceptible at the lower resolutions due to excessive smoothing), but smooth filtering decreases as resolution increases.

Minimal reproduction project:
Shadow Test.zip
The only setting I changed between the screenshots was shadow atlas size. It's
currently set to max in this project. The omni light has its bias set to 0.05, but is otherwise unchanged.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions