summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweroctree.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-12-03 15:52:36 -0800
committerRichard Linden <none@none>2013-12-03 15:52:36 -0800
commit3cb64c5038b7cde8bd44ec3a029d477e415085ee (patch)
tree38085823779454f6cd487e8dc5e4dd16dd8dd670 /indra/newview/llvieweroctree.cpp
parent29476d29c4c78a6417c45090bdc6ea14c8251d73 (diff)
SH-4606 FIX Interesting: Small objects do not load until they are very close.
changed culling to use inverse distance to calculate solid angle, not distance squared
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r--indra/newview/llvieweroctree.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index aef632e913..88f3c7d6f9 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -1440,11 +1440,8 @@ S32 LLViewerOctreeCull::AABBRegionSphereIntersectObjectExtents(const LLViewerOct
//------------------------------------------
//check if the objects projection large enough
-static LLTrace::BlockTimerStatHandle sProjectedAreaCheckTimeStat("Object projected area check", "Culling objects based on projected area");
-
bool LLViewerOctreeCull::checkProjectionArea(const LLVector4a& center, const LLVector4a& size, const LLVector3& shift, F32 pixel_threshold, F32 near_radius)
{
- LL_RECORD_BLOCK_TIME(sProjectedAreaCheckTimeStat);
LLVector3 local_orig = mCamera->getOrigin() - shift;
LLVector4a origin;
origin.load3(local_orig.mV);
@@ -1462,7 +1459,7 @@ bool LLViewerOctreeCull::checkProjectionArea(const LLVector4a& center, const LLV
distance -= near_radius;
F32 squared_rad = size.dot3(size).getF32();
- return squared_rad / (distance * distance) > pixel_threshold;
+ return squared_rad / distance > pixel_threshold;
}
//virtual