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

Fix wide SpotLight3D clustering #100236

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

Flarkk
Copy link
Contributor

@Flarkk Flarkk commented Dec 10, 2024

Fixes #89698
Fixes #81772

Wide spotlights are expected to be clustered like omni lights.

Currently they're correctly rendered as spheres with the right radius (like omnis) but intersection with near and far planes is still checked against a cone volume. This generate false positive or missed hits depending on the camera's location relative to the spotlight, znear and zfar values.

This PR ensures wide spotlights get tested against near and far planes using a sphere like omnis, by using the same code branch.

@Flarkk Flarkk requested a review from a team as a code owner December 10, 2024 09:26
@Chaosus Chaosus added this to the 4.4 milestone Dec 10, 2024
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@Flarkk Flarkk force-pushed the fix_spot_clustering branch from eb8e0d6 to 02f05cf Compare December 13, 2024 10:28
@Repiteo Repiteo merged commit 9f0c623 into godotengine:master Dec 13, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 13, 2024

Thanks!

@Flarkk Flarkk deleted the fix_spot_clustering branch December 14, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants