mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-17 12:00:26 +02:00
Grow culling spheres with enlarged objects
This commit is contained in:
1 parent
201874d783
commit
77efb01b00
1 file changed
+4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user