X Tutup
Skip to content

Fix rounding error in clustered vertex light culling#110184

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
Namey5:vertex-lighting-issue
Sep 17, 2025
Merged

Fix rounding error in clustered vertex light culling#110184
Repiteo merged 1 commit intogodotengine:masterfrom
Namey5:vertex-lighting-issue

Conversation

@Namey5
Copy link
Contributor

@Namey5 Namey5 commented Sep 1, 2025

Looks like there was a rounding error when calculating what clustered light tile to use for off-screen vertices - I've just moved some more of the logic to integer precision to make it a bit more consistent with per-pixel lighting.

Before:

Screencast.From.2025-09-02.09-32-43.mp4

After:

Screencast.From.2025-09-02.09-33-46.mp4

@Namey5 Namey5 requested a review from a team as a code owner September 1, 2025 23:47
@Namey5 Namey5 force-pushed the vertex-lighting-issue branch from f7091c4 to 60a7bed Compare September 2, 2025 01:34
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.

Nice work!

@clayjohn clayjohn added this to the 4.6 milestone Sep 2, 2025
@clayjohn clayjohn added bug topic:rendering cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Sep 2, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected. Code looks good to me.

@Repiteo Repiteo merged commit e504943 into godotengine:master Sep 17, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Sep 17, 2025

Thanks!

ProfessorOctopus pushed a commit to ProfessorOctopus/godot that referenced this pull request Oct 5, 2025
Fix rounding error in clustered vertex light culling
@akien-mga
Copy link
Member

Cherry-picked for 4.5.2.

@akien-mga akien-mga removed cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Jan 8, 2026
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.

Vertex lights are wrongly culled [4.4.dev3] Forward+ Vertex Lighting clipping on the bottom of viewport/camera/screen for some resolutions

5 participants

X Tutup