summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-03-26 13:16:47 -0700
committerGraham Linden <graham@lindenlab.com>2019-03-26 13:16:47 -0700
commit872b36488a7f3b1d9095e129e3973fefa11e85ba (patch)
treeeb9c316b4fb8bdee5f202ff9c3559ab5ac8ab409 /indra/newview
parent92f79a7c102170011724430f30ce1aaf40031d21 (diff)
Modify spotlight prio calc to more stable version.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvovolume.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index afccc1c42c..4ddd9c4568 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3278,6 +3278,7 @@ void LLVOVolume::updateSpotLightPriority()
F32 r = getLightRadius();
LLVector3 pos = mDrawable->getPositionAgent();
+#if OLD_SPOT_PRIO_CALC
LLVector3 at(0,0,-1);
at *= getRenderRotation();
pos += at * r;
@@ -3286,8 +3287,9 @@ void LLVOVolume::updateSpotLightPriority()
pos -= at * r;
mSpotLightPriority = gPipeline.calcPixelArea(pos, LLVector3(r,r,r), *LLViewerCamera::getInstance());
-
- //mSpotLightPriority = (gAgent.getPositionAgent() - pos).length() + r;
+#else
+ mSpotLightPriority = (gAgent.getPositionAgent() - pos).length() + r;
+#endif
if (mLightTexture.notNull())
{