From 329d25b1fafccf5e8059c494b6210f1805b0b4bb Mon Sep 17 00:00:00 2001 From: Rudolph Bester Date: Thu, 5 Dec 2024 18:54:13 +0200 Subject: [PATCH] Fixed occlusion culling buffer getting overwritten in larger scenes --- modules/raycast/raycast_occlusion_cull.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/raycast/raycast_occlusion_cull.cpp b/modules/raycast/raycast_occlusion_cull.cpp index b136d54520a..fb2d0023b60 100644 --- a/modules/raycast/raycast_occlusion_cull.cpp +++ b/modules/raycast/raycast_occlusion_cull.cpp @@ -366,7 +366,7 @@ void RaycastOcclusionCull::Scenario::_transform_vertices_thread(uint32_t p_threa } void RaycastOcclusionCull::Scenario::_transform_vertices_range(const Vector3 *p_read, float *p_write, const Transform3D &p_xform, int p_from, int p_to) { - float *floats_w = p_write; + float *floats_w = p_write + 3 * p_from; for (int i = p_from; i < p_to; i++) { const Vector3 p = p_xform.xform(p_read[i]); floats_w[0] = p.x;