summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-03-26 08:21:53 -0700
committerGraham Linden <graham@lindenlab.com>2019-03-26 08:21:53 -0700
commit446afe2d1a081a0e10a34749bbe1e4475075dae0 (patch)
treed8d54398d764eaa59c564896c8ff74e71e1f4f63 /indra/newview
parentd99e2e119f08370b2003bad23617b7fdd435d19e (diff)
Make whether the sun or moon is primary part of llrender light state so we can set uniforms for shaders along with other light params.
Fix atten calcs to not use abs val.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/pipeline.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index c4a644c7b6..4c93d16fb1 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6240,6 +6240,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
LLLightState* light = gGL.getLight(0);
light->setPosition(light_dir);
+ light->setSunPrimary(sun_up);
light->setDiffuse(mSunDiffuse);
light->setDiffuseB(mMoonDiffuse);
light->setAmbient(LLColor4::black);
@@ -6361,7 +6362,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
{
mHWLightColors[cur_light] = LLColor4::black;
LLLightState* light = gGL.getLight(cur_light);
-
+ light->setSunPrimary(true);
light->setDiffuse(LLColor4::black);
light->setAmbient(LLColor4::black);
light->setSpecular(LLColor4::black);