浏览代码

Slims down the obj size get math to just use the worldSphere radius rather than computing the bounds width to save cycles.

Areloch 5 年之前
父节点
当前提交
b9e16649d9
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      Engine/source/T3D/tsStatic.cpp

+ 1 - 5
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)
       {