diff options
author | Merov Linden <merov@lindenlab.com> | 2012-11-17 15:48:07 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-11-17 15:48:07 -0800 |
commit | 61f3c1b41ddedc16f2026c62600475105621b305 (patch) | |
tree | af2124f540a4ff55c08cec7038458e883747fe47 /indra/newview/llface.cpp | |
parent | 2d25eb18adc0c2c97c63a8e02f2274362672137c (diff) | |
parent | c6a0f0ae1dec5ef2f7657d8c1ca07d85c1fef55d (diff) |
Merge pull from richard/viewer-chui
Diffstat (limited to 'indra/newview/llface.cpp')
-rwxr-xr-x | indra/newview/llface.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 582f06eeb0..188f943f13 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2168,6 +2168,12 @@ BOOL LLFace::hasMedia() const const F32 LEAST_IMPORTANCE = 0.05f ; const F32 LEAST_IMPORTANCE_FOR_LARGE_IMAGE = 0.3f ; +void LLFace::resetVirtualSize() +{ + setVirtualSize(0.f); + mImportanceToCamera = 0.f; +} + F32 LLFace::getTextureVirtualSize() { F32 radius; @@ -2233,8 +2239,17 @@ BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) LLVector4a t; t.load3(camera->getOrigin().mV); lookAt.setSub(center, t); + F32 dist = lookAt.getLength3().getF32(); - dist = llmax(dist-size.getLength3().getF32(), 0.f); + dist = llmax(dist-size.getLength3().getF32(), 0.001f); + //ramp down distance for nearby objects + if (dist < 16.f) + { + dist /= 16.f; + dist *= dist; + dist *= 16.f; + } + lookAt.normalize3fast() ; //get area of circle around node |