diff options
author | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-05-23 01:16:12 +0100 |
---|---|---|
committer | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-05-23 01:16:12 +0100 |
commit | 439273c9c11ec5f3c186fd7d97a28d11419153cd (patch) | |
tree | f6e4f1566425921d71e40b9628011eb0f5f539f3 /indra/newview/pipeline.cpp | |
parent | 13536bb273b7413aa4461c8eeaf5a6a865f4234d (diff) | |
parent | 689beff6698fcb8582c44f58bb9896606850b149 (diff) |
Merge
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b2ec9a6a66..625f811789 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6034,7 +6034,7 @@ void LLPipeline::setupAvatarLights(bool for_edit) } } F32 backlight_mag; - if (gSky.getSunDirection().mV[2] >= NIGHTTIME_ELEVATION_SIN) + if (LLEnvironment::instance().getIsSunUp()) { backlight_mag = BACKLIGHT_DAY_MAGNITUDE_OBJECT; } @@ -6253,14 +6253,16 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) // Light 0 = Sun or Moon (All objects) { - if (gSky.getSunDirection().mV[2] >= NIGHTTIME_ELEVATION_SIN) + LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); + + if (LLEnvironment::instance().getIsSunUp()) { - mSunDir.setVec(gSky.getSunDirection()); + mSunDir.setVec(psky->getSunDirection()); mSunDiffuse.setVec(gSky.getSunDiffuseColor()); } else { - mSunDir.setVec(gSky.getMoonDirection()); + mSunDir.setVec(psky->getMoonDirection()); mSunDiffuse.setVec(gSky.getMoonDiffuseColor()); } |