Explorar o código

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

Areloch %!s(int64=5) %!d(string=hai) anos
pai
achega
b9e16649d9
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  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)
       {