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

OpenGL: DirectionalLight3D applies Fade Start incorrectly when using PSSM 2 Splits or 4 Splits mode #82505

Closed
Tracked by #66458
Calinou opened this issue Sep 28, 2023 · 0 comments · Fixed by #83252
Closed
Tracked by #66458

Comments

@Calinou
Copy link
Member

Calinou commented Sep 28, 2023

Godot version

4.2.dev fbe611e

System information

Fedora 38, GeForce RTX 4090 (NVIDIA 535.104.05)

Issue description

DirectionalLight3D applies Fade Start incorrectly when using PSSM 2 Splits or 4 Splits mode. This is with Fade Start set to 1.0 – no fading should occur at all, yet the last split is always faded when using PSSM 2 Splits or PSSM 4 Splits:

Orthogonal PSSM 2 Splits PSSM 4 Splits
Screenshot_20230929_001106 Screenshot_20230929_001111 Screenshot_20230929_001116

When using Forward+ or Mobile, the effective fade distance doesn't change in any way regardless of the shadow mode used (including Orthogonal). This is the expected behavior, as it allows optimal sizing of the Shadow Max Distance when tuning shadows for small/medium-sized indoor scenes.

Steps to reproduce

  • Add some meshes in a scene.
  • Create a DirectionalLight3D node and enable shadows on it. Decrease its Shadow Max Distance to a low value like 20.
  • Play around with the Fade Start property in DirectionalLight3D, while having one of the meshes near the end of the Shadow Max Distance (so you see the shadow fade out progressively).
  • Set the shadow mode in DirectionalLight3D to Orthogonal, PSSM 2 Splits then 4 Splits.
  • Notice how fading changes.

Minimal reproduction project

test_shadow_compatibility_fade_start.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants