Skip to content

Conversation

@rpgshooter
Copy link

@rpgshooter rpgshooter commented Jan 6, 2026

Description:

Fixes #98993

Omni and Spot light shadow culling in _light_instance_update_shadow() was missing the visibility range check that directional light shadows have in _scene_cull(). This caused objects to cast shadows even when hidden by visibility range.

Adds the visibility range distance check to all three shadow culling paths (omni dual paraboloid, omni cube, spot).
Example of fix:
Example.webm

And example of 4.6-beta2 on MRP:
Screenshot_20260106_135741
And the fix on MRP:
Screenshot_20260106_135829

@rpgshooter rpgshooter marked this pull request as ready for review January 6, 2026 18:44
@rpgshooter rpgshooter requested a review from a team as a code owner January 6, 2026 18:44
@akien-mga akien-mga added this to the 4.x milestone Jan 6, 2026
@rpgshooter
Copy link
Author

i thought i passed this through pre-check, with passing clang-format, i'll commit a clang-format fixed version then squash them. then re-pull

@rpgshooter rpgshooter marked this pull request as draft January 7, 2026 17:24
@rpgshooter rpgshooter closed this Jan 7, 2026
@rpgshooter rpgshooter force-pushed the omni-light-shadow-fix branch from 351cb9a to f4499ee Compare January 7, 2026 17:41
@rpgshooter rpgshooter reopened this Jan 7, 2026
@rpgshooter rpgshooter marked this pull request as ready for review January 7, 2026 17:52
@rpgshooter
Copy link
Author

rpgshooter commented Jan 7, 2026

sorry for the close, this commit should be the fixed clang-format version, passed same actions as main, here:
https://github.com/rpgshooter/godot/actions/runs/20790274384/job/59710540639
and
https://github.com/rpgshooter/godot/actions/runs/20790854378

@TokisanGames
Copy link
Contributor

Rpg, look at the commit history. There are 3, two merges. Drop the merges and properly rebase the one commit on master. There should only be one clean commit. Look at the godot contributor doc for interactive rebase.

@rpgshooter rpgshooter force-pushed the omni-light-shadow-fix branch from 91b7603 to ea92ec1 Compare January 13, 2026 07:21
@rpgshooter
Copy link
Author

fixed, my bad was updating another branch and this got included.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visibility ranges ignored when casting shadows under Omni/Spot lights

3 participants