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 occlusion culling buffer getting overwritten in larger scenes #100060

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

Rudolph-B
Copy link
Contributor

@Rudolph-B Rudolph-B commented Dec 5, 2024

Fixes #100032

On subsequent calls to _transform_vertices_range() (where p_from would have been adjusted) it would still start writing to the same index in of xformed_vertices effectively overwriting and corrupting vertex data previously written.

The correct implementation is to offset p_write with 3*p_from.

I tested using occlusion_culling_mesh_lod for both double and float builds.

Before:
image

After:
image

@Rudolph-B Rudolph-B requested a review from a team as a code owner December 5, 2024 17:12
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.

Makes sense!

@clayjohn clayjohn added this to the 4.4 milestone Dec 5, 2024
@Repiteo Repiteo merged commit 4d0ce3c into godotengine:master Dec 5, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 5, 2024

Thanks!

werryxgames pushed a commit to werryxgames/godot that referenced this pull request Dec 8, 2024
Fixed occlusion culling buffer getting overwritten in larger scenes
@akien-mga akien-mga changed the title Fixed occlusion culling buffer getting overwritten in larger scenes Fix occlusion culling buffer getting overwritten in larger scenes Dec 18, 2024
@Rudolph-B Rudolph-B deleted the Issue-100032 branch February 16, 2025 06:12
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.

Regression: Occlusion culling randomly occluding things completely in the open.
3 participants