From b9e16649d91ba383967344ca1adc314626c744b1 Mon Sep 17 00:00:00 2001 From: Areloch Date: Mon, 3 Aug 2020 18:12:21 -0500 Subject: [PATCH] Slims down the obj size get math to just use the worldSphere radius rather than computing the bounds width to save cycles. --- Engine/source/T3D/tsStatic.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp index 2ab764655..506de16bc 100644 --- a/Engine/source/T3D/tsStatic.cpp +++ b/Engine/source/T3D/tsStatic.cpp @@ -826,11 +826,7 @@ void TSStatic::prepRenderImage(SceneRenderState* state) } else if (smUseStaticObjectFade) { - //todo, scale-adjust the fade via bounds sizing? - Box3F bounds = getObjBox(); - bounds.scale(getScale()); - - F32 boundsLen = bounds.len(); + F32 boundsLen = getWorldSphere().radius; if (boundsLen < smStaticObjectUnfadeableSize) {