summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2020-03-26 22:00:54 +0000
committerDave Parks <davep@lindenlab.com>2020-03-26 22:00:54 +0000
commit964597af05b63057a7ddeff9aa8a6cea40421165 (patch)
treeb8fd89cfdb0f80d31fdd32b9cb423665aeecf02b /indra/newview/pipeline.cpp
parenta248018d6d761025482b3cc6579da5fed185f124 (diff)
parentd756e185730f46fd78e88215e0b4b9fd282fd1d7 (diff)
Merged in davep/DRTVWR-440 (pull request #48)
SL-12902 Fix for doing the technically correct but compatibility wrong thing WRT light color values.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index fda79984ab..1765ba227f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6325,7 +6325,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
mLightMovingMask |= (1<<cur_light);
}
- LLColor4 light_color = sRenderDeferred ? light->getLightSRGBColor() : light->getLightColor();
+ //NOTE: for legacy reasons, send sRGB color to light shader for both deferred and non-deferred path
+ LLColor4 light_color = light->getLightColor();
light_color.mV[3] = 0.0f;
F32 fade = iter->fade;
@@ -8767,7 +8768,8 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
const F32* c = center.getF32ptr();
F32 s = volume->getLightRadius()*1.5f;
- LLColor3 col = volume->getLightSRGBColor();
+ //NOTE: for legacy reasons, send sRGB color to light shader
+ LLColor3 col = volume->getLightColor();
if (col.magVecSquared() < 0.001f)
{
@@ -8859,7 +8861,8 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
setupSpotLight(gDeferredSpotLightProgram, drawablep);
- LLColor3 col = volume->getLightSRGBColor();
+ //NOTE: for legacy reasons, send sRGB color to light shader
+ LLColor3 col = volume->getLightColor();
gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c);
gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s);
@@ -8948,8 +8951,8 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
setupSpotLight(gDeferredMultiSpotLightProgram, drawablep);
- LLColor3 col = volume->getLightSRGBColor();
-
+ //NOTE: for legacy reasons, send sRGB color to light shader
+ LLColor3 col = volume->getLightColor();
gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, light_size_final);