Skip to content

[4.3] Fixed occlusion culling buffer getting overwritten in larger scenes#978

Merged
Spartan322 merged 1 commit intoRedot-Engine:4.3from
Spartan322:4.3-fix/occlusion-culling
Mar 6, 2025
Merged

[4.3] Fixed occlusion culling buffer getting overwritten in larger scenes#978
Spartan322 merged 1 commit intoRedot-Engine:4.3from
Spartan322:4.3-fix/occlusion-culling

Conversation

@Spartan322
Copy link
Contributor

@Spartan322 Spartan322 commented Mar 6, 2025

(cherry picked from commit 329d25b)


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

Copy link
Contributor

@trashguy trashguy left a comment

Choose a reason for hiding this comment

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

GG

@Spartan322 Spartan322 merged commit f41b587 into Redot-Engine:4.3 Mar 6, 2025
18 checks passed
@Spartan322 Spartan322 deleted the 4.3-fix/occlusion-culling branch March 6, 2025 17:34
@github-project-automation github-project-automation bot moved this from Open to Done in Engine Overview Mar 6, 2025
@Spartan322 Spartan322 linked an issue Mar 6, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[4.3] Occlusion culling broken in 4.3.1 Alpha

3 participants