diff options
author | Graham Linden <graham@lindenlab.com> | 2019-05-31 13:47:44 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-05-31 13:47:44 -0700 |
commit | 58f7b981bdb415311f23dfffc39e7a841b3017a0 (patch) | |
tree | c2ab03473650063efdc37deb0701a58035ff7ff9 /indra/newview/pipeline.cpp | |
parent | 485c5978e7559471f4dad66fb141408262d75363 (diff) |
SL-11337
Fix handling of ambient (was getting reset to 1,1,1,1 unintentionally).
Modify shaders to balance ambient across render modes again.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 33b953beb7..50970293ef 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6191,22 +6191,15 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) LLEnvironment& environment = LLEnvironment::instance(); LLSettingsSky::ptr_t psky = environment.getCurrentSky(); - - // Ambient + if (!LLGLSLShader::sNoFixedFunction) { - gGL.syncMatrices(); - LLColor4 ambient = psky->getTotalAmbient(); - gGL.setAmbientLightColor(ambient); + gGL.syncMatrices(); } // Ambient - if (!LLGLSLShader::sNoFixedFunction) - { - gGL.syncMatrices(); - LLColor4 ambient = psky->getTotalAmbient(); - gGL.setAmbientLightColor(ambient); - } + LLColor4 ambient = psky->getTotalAmbient(); + gGL.setAmbientLightColor(ambient); bool sun_up = environment.getIsSunUp(); bool moon_up = environment.getIsMoonUp(); @@ -6502,9 +6495,6 @@ void LLPipeline::enableLights(U32 mask) } mLightMask = mask; stop_glerror(); - - LLColor4 ambient = LLEnvironment::instance().getCurrentSky()->getTotalAmbient(); - gGL.setAmbientLightColor(ambient); } } @@ -6620,13 +6610,11 @@ void LLPipeline::enableLightsAvatarEdit(const LLColor4& color) gGL.setAmbientLightColor(color); } -void LLPipeline::enableLightsFullbright(const LLColor4& color) +void LLPipeline::enableLightsFullbright() { assertInitialized(); U32 mask = 0x1000; // Non-0 mask, set ambient enableLights(mask); - - gGL.setAmbientLightColor(color); } void LLPipeline::disableLights() |