diff options
| author | Dave Parks <davep@lindenlab.com> | 2020-03-27 22:33:57 +0000 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2020-03-27 22:33:57 +0000 |
| commit | c28852bd9aef0d3f69dd1fb76b8208666af68613 (patch) | |
| tree | 6b3baf227dbd5b998309f48f983bc15c5a66253b /indra/newview/pipeline.cpp | |
| parent | f61474fe5b3bd616fdd2d92fbb3478891bb60fb1 (diff) | |
| parent | e468d8018634b51f329eae17485c3358c0a3630b (diff) | |
Merged in davep/DRTVWR-440 (pull request #52)
SL-12902 Better fix for light color values in color swatch not matching light color values inworld.
Diffstat (limited to 'indra/newview/pipeline.cpp')
| -rw-r--r-- | indra/newview/pipeline.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1765ba227f..563b45273e 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6325,8 +6325,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) mLightMovingMask |= (1<<cur_light); } - //NOTE: for legacy reasons, send sRGB color to light shader for both deferred and non-deferred path - LLColor4 light_color = light->getLightColor(); + //send linear light color to shader + LLColor4 light_color = light->getLightLinearColor(); light_color.mV[3] = 0.0f; F32 fade = iter->fade; @@ -8768,8 +8768,8 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) const F32* c = center.getF32ptr(); F32 s = volume->getLightRadius()*1.5f; - //NOTE: for legacy reasons, send sRGB color to light shader - LLColor3 col = volume->getLightColor(); + //send light color to shader in linear space + LLColor3 col = volume->getLightLinearColor(); if (col.magVecSquared() < 0.001f) { @@ -8861,8 +8861,8 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) setupSpotLight(gDeferredSpotLightProgram, drawablep); - //NOTE: for legacy reasons, send sRGB color to light shader - LLColor3 col = volume->getLightColor(); + //send light color to shader in linear space + LLColor3 col = volume->getLightLinearColor(); gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c); gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s); @@ -8951,8 +8951,8 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) setupSpotLight(gDeferredMultiSpotLightProgram, drawablep); - //NOTE: for legacy reasons, send sRGB color to light shader - LLColor3 col = volume->getLightColor(); + //send light color to shader in linear space + LLColor3 col = volume->getLightLinearColor(); gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v); gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, light_size_final); |
