summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-03-26 10:28:25 -0700
committerGraham Linden <graham@lindenlab.com>2019-03-26 10:28:25 -0700
commitfb7c887a5e09024731038eef0a57e5f1e8e08b2e (patch)
tree9563119c9a44e03c642de828cb93e9399e1c4c35 /indra/newview/llvovolume.cpp
parent446afe2d1a081a0e10a34749bbe1e4475075dae0 (diff)
More consistent lighting across ALM/non-ALM/deferred/forward rendering.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 671f4d49a7..f97e0ff2e7 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3275,12 +3275,13 @@ F32 LLVOVolume::getSpotLightPriority() const
void LLVOVolume::updateSpotLightPriority()
{
+ F32 r = getLightRadius();
LLVector3 pos = mDrawable->getPositionAgent();
- LLVector3 at(0,0,-1);
- at *= getRenderRotation();
+ LLVector3 agent_pos = gAgent.getPositionAgent();
- F32 r = getLightRadius()*0.5f;
+ LLVector3 at(0,0,-1);
+ at *= getRenderRotation();
pos += at * r;
at = LLViewerCamera::getInstance()->getAtAxis();
@@ -3289,6 +3290,8 @@ void LLVOVolume::updateSpotLightPriority()
mSpotLightPriority = gPipeline.calcPixelArea(pos, LLVector3(r,r,r), *LLViewerCamera::getInstance());
+ //mSpotLightPriority = (agent_pos - pos).length() + r;
+
if (mLightTexture.notNull())
{
mLightTexture->addTextureStats(mSpotLightPriority);