diff options
author | Mark Palange <palange@lindenlab.com> | 2009-02-03 21:15:57 +0000 |
---|---|---|
committer | Mark Palange <palange@lindenlab.com> | 2009-02-03 21:15:57 +0000 |
commit | 46f8fb8781ccce338b4a88aaf8371ee3dec56d29 (patch) | |
tree | b2dc09521a166d2181c48f4a4f1ca90b83b99477 /indra/newview/llvotextbubble.cpp | |
parent | e188badaf29a1a02307f93864eed6737096bd9a1 (diff) |
svn merge -r107016:108767 svn+ssh://svn.lindenlab.com/svn/linden/viewer/viewer_1-22
Merge back of viewer 1.22 RC6 and RC7 change to trunk.
QAR-1214 and QAR-1227
Diffstat (limited to 'indra/newview/llvotextbubble.cpp')
-rw-r--r-- | indra/newview/llvotextbubble.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/indra/newview/llvotextbubble.cpp b/indra/newview/llvotextbubble.cpp index 19e7e389e7..de69aac037 100644 --- a/indra/newview/llvotextbubble.cpp +++ b/indra/newview/llvotextbubble.cpp @@ -119,30 +119,16 @@ BOOL LLVOTextBubble::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) void LLVOTextBubble::updateTextures(LLAgent &agent) { // Update the image levels of all textures... - // First we do some quick checks. - U32 i; - // This doesn't take into account whether the object is in front - // or behind... - - LLVector3 position_local = getPositionAgent() - agent.getCameraPositionAgent(); - F32 dot_product = position_local * agent.getFrameAgent().getAtAxis(); - F32 cos_angle = dot_product / position_local.length(); - - if (cos_angle > 1.f) - { - cos_angle = 1.f; - } - - for (i = 0; i < getNumTEs(); i++) + for (U32 i = 0; i < getNumTEs(); i++) { const LLTextureEntry *te = getTE(i); F32 texel_area_ratio = fabs(te->mScaleS * te->mScaleT); - + texel_area_ratio = llclamp(texel_area_ratio, .125f, 16.f); LLViewerImage *imagep = getTEImage(i); if (imagep) { - imagep->addTextureStats(mPixelArea, texel_area_ratio, cos_angle); + imagep->addTextureStats(mPixelArea / texel_area_ratio); } } } |