diff options
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r-- | indra/newview/llenvironment.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index d88f0f9847..c59fad82a4 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1758,7 +1758,11 @@ void LLEnvironment::updateGLVariablesForSettings(LLShaderUniforms* uniforms, con { // maximize and remove tinting if this is an irradiance map render pass and the parameter feeds into the sky background color auto max_vec = [](LLVector4 col) { - col.mV[0] = col.mV[1] = col.mV[2] = llmax(llmax(col.mV[0], col.mV[1]), col.mV[2]); + LLColor3 color(col); + F32 h, s, l; + color.calcHSL(&h, &s, &l); + + col.mV[0] = col.mV[1] = col.mV[2] = l; return col; }; |