diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-11-11 14:50:32 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-11-11 14:50:32 -0700 |
commit | 83c2098fb99c4a4d33dfa5f4a71ab64ca39b547f (patch) | |
tree | 04bfcdd3da3da94cc667ab6fae23e80b6c05988c /indra/newview/llvieweroctree.cpp | |
parent | d71cafa4bcecb311bce626a15dd185e4750994ea (diff) |
fix for SH-4607: Create new object cache tuning parameters
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r-- | indra/newview/llvieweroctree.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 1b3d7da90d..06ff68c6c3 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -1429,7 +1429,7 @@ S32 LLViewerOctreeCull::AABBRegionSphereIntersectObjectExtents(const LLViewerOct } //------------------------------------------ //check if the objects projection large enough -bool LLViewerOctreeCull::checkProjectionArea(const LLVector4a& center, const LLVector4a& size, const LLVector3& shift, F32 projection_cutoff) +bool LLViewerOctreeCull::checkProjectionArea(const LLVector4a& center, const LLVector4a& size, const LLVector3& shift, F32 pixel_threshold, F32 near_squared_radius) { LLVector3 local_orig = mCamera->getOrigin() - shift; LLVector4a origin; @@ -1438,14 +1438,13 @@ bool LLViewerOctreeCull::checkProjectionArea(const LLVector4a& center, const LLV LLVector4a lookAt; lookAt.setSub(center, origin); F32 squared_dist = lookAt.dot3(lookAt).getF32(); - F32 squared_rad = size.dot3(size).getF32(); - - if(squared_dist > 0.f) + if(squared_dist < near_squared_radius) { - return squared_rad / squared_dist > projection_cutoff; + return true; //always load closeby objects } - return true; + F32 squared_rad = size.dot3(size).getF32(); + return squared_rad / squared_dist > pixel_threshold; } //virtual |