-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix orthographic cluster aabb for spotlight culling #9614
Conversation
@itsybitesyspider any chance you could test if this works for you? |
Sure! I have to run to work now but I can test it in the next 24 hrs. |
Your branch (b70eb21) fixed the issue for me, both in the example and in my game project (modulo challenges to update my game project from 0.11). It also did no harm to the use cases that already worked correctly. I don't know what the norms are for approving PRs to bevy, but if it helps anyone, I would approve this PR. |
Yes please do, especially since you reported the bug, but it would be helpful regardless. Thanks for checking! |
# Objective fix bevyengine#9605 spotlight culling uses an incorrect cluster aabb for orthographic projections: it does not take into account the near and far cluster bounds at all. ## Solution use z_near and z_far to determine cluster aabb in orthographic mode. i'm not 100% sure this is the only change that's needed, but i am sure this change is needed, and the example seems to work well now (CLUSTERED_FORWARD_DEBUG_CLUSTER_LIGHT_COMPLEXITY shows good bounds around the cone for a variety of orthographic setups).
# Objective fix bevyengine#9605 spotlight culling uses an incorrect cluster aabb for orthographic projections: it does not take into account the near and far cluster bounds at all. ## Solution use z_near and z_far to determine cluster aabb in orthographic mode. i'm not 100% sure this is the only change that's needed, but i am sure this change is needed, and the example seems to work well now (CLUSTERED_FORWARD_DEBUG_CLUSTER_LIGHT_COMPLEXITY shows good bounds around the cone for a variety of orthographic setups).
# Objective fix bevyengine#9605 spotlight culling uses an incorrect cluster aabb for orthographic projections: it does not take into account the near and far cluster bounds at all. ## Solution use z_near and z_far to determine cluster aabb in orthographic mode. i'm not 100% sure this is the only change that's needed, but i am sure this change is needed, and the example seems to work well now (CLUSTERED_FORWARD_DEBUG_CLUSTER_LIGHT_COMPLEXITY shows good bounds around the cone for a variety of orthographic setups).
Objective
fix #9605
spotlight culling uses an incorrect cluster aabb for orthographic projections: it does not take into account the near and far cluster bounds at all.
Solution
use z_near and z_far to determine cluster aabb in orthographic mode.
i'm not 100% sure this is the only change that's needed, but i am sure this change is needed, and the example seems to work well now (CLUSTERED_FORWARD_DEBUG_CLUSTER_LIGHT_COMPLEXITY shows good bounds around the cone for a variety of orthographic setups).