diff options
| author | Monty Brandenberg <monty@lindenlab.com> | 2012-09-08 18:56:43 -0400 |
|---|---|---|
| committer | Monty Brandenberg <monty@lindenlab.com> | 2012-09-08 18:56:43 -0400 |
| commit | 4091e47cf206a41cac7ee440b8fd2e2898006685 (patch) | |
| tree | 61de24d7aa90171a5fb6481189567fe408d03786 /indra/newview/llface.cpp | |
| parent | 81b9e29a1fe227c8f51c6a644b4e2e1afa6bcfb2 (diff) | |
| parent | 09cd2a4b1a9f1ddf046fb0ce5d12988b968269a3 (diff) | |
DRTVWR-209 Merge of viewer-development with SH-3316 drano-http code.
cmake and other files didn't get moved over, do it by hand.
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 |
