diff options
author | Oz Linden <oz@lindenlab.com> | 2012-08-15 17:07:10 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-08-15 17:07:10 -0400 |
commit | 97106c2dea855e7a7a6378e0b6971d7a8226f1f6 (patch) | |
tree | b1cc26bc18f8ec28fba94e0f91035bfb73d96452 /indra/newview/llface.cpp | |
parent | 981190cf3151f436d370b841b1baa5a2a607b94d (diff) | |
parent | f2eef652063f7f2aee7296ff41cf5d34272cc12b (diff) |
merge changes for DRTVWR-194
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r-- | 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 8d0664770b..4a0c94df33 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2167,6 +2167,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; @@ -2232,8 +2238,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 |