diff options
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
| -rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index e608f6eaf2..7f59852b62 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -503,7 +503,12 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor()); - sun_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); + if (LLPipeline::RenderDeferred) { + sun_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, srgbColor4(color).mV); + } + else { + sun_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); + } sun_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); LLFacePool::LLOverrideFaceColor color_override(this, color); @@ -554,9 +559,15 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() F32 moon_brightness = (float)psky->getMoonBrightness(); moon_shader->uniform1f(LLShaderMgr::MOON_BRIGHTNESS, moon_brightness); - moon_shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, gSky.mVOSkyp->getMoon().getColor().mV); - moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); + if (LLPipeline::RenderDeferred) { + moon_shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, srgbColor4(gSky.mVOSkyp->getMoon().getColor()).mV); + moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, srgbColor4(color).mV); + } + else { + moon_shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, gSky.mVOSkyp->getMoon().getColor().mV); + moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); + } moon_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); LLFacePool::LLOverrideFaceColor color_override(this, color); |
