diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2012-06-14 12:01:21 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2012-06-14 12:01:21 -0600 |
commit | 52411f83a1e92d8449f68a6528f5b78e7c391553 (patch) | |
tree | 541326d0673fe9fcdcdd08f53158a7fd4912dbe4 /indra | |
parent | 0d80aced2477500ed5912a34e2bc4b6dbf8f719a (diff) |
fix for MAINT-758: [PUBLIC]texture discard level is inconsistent between sessions
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llface.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 75cd209e1a..f4e46ae3ea 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2030,8 +2030,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 |