diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2013-11-11 14:50:52 -0700 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2013-11-11 14:50:52 -0700 |
| commit | 1983f52ce5211c02a55f5cabd86962eea3a22084 (patch) | |
| tree | 7bf52ee5cfde218d36eeebd6188432cb4655b009 /indra/newview/llvieweroctree.cpp | |
| parent | 7956b9e3e83ed4a5d648e63ae7c06a90313a6b09 (diff) | |
| parent | 83c2098fb99c4a4d33dfa5f4a71ab64ca39b547f (diff) | |
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
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 |
