Przeglądaj źródła

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

Areloch 5 lat temu
rodzic
commit
b9e16649d9
1 zmienionych plików z 1 dodań i 5 usunięć
  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)
    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)
       if (boundsLen < smStaticObjectUnfadeableSize)
       {
       {