From 77efb01b008e1ecc6acd6ffdd219338a9b94bbb7 Mon Sep 17 00:00:00 2001 From: eltanschauung <158000645+eltanschauung@users.noreply.github.com> Date: Tue, 6 Oct 2026 01:29:48 -0400 Subject: [PATCH] Grow culling spheres with enlarged objects --- source/objects/objects.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/objects/objects.h b/source/objects/objects.h index 20cf85ff..00e76414 100644 --- a/source/objects/objects.h +++ b/source/objects/objects.h @@ -529,6 +529,10 @@ __inline void object_get_render_bounding_sphere( *center = object->object.bounding_sphere_center; *radius = object_definition_get(object->definition_index)->object.render_bounding_radius; + /* Growing an object must grow its culling sphere. Preserve the existing + * conservative sphere for scales at or below one. */ + if (object->object.scale > 1.0f) + *radius *= object->object.scale; return; }