diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-04-12 14:51:56 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-04-12 14:51:56 -0500 |
commit | d6b99cff8ab7550b5e0316c831087050f19c91c6 (patch) | |
tree | 0b4238dac555306436a8aaa1b6fb49513fb703d3 /indra/newview | |
parent | 63c571191489539faafd4c97b3c870fb5e630e97 (diff) |
SL-19390 Make "Cloud Coverage" feedback into ambient when probe ambiance is zero and feedback into probe ambiance when probe ambiance is not zero.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llsettingsvo.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index a609c98d61..f2f269fa63 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -723,8 +723,20 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force) } else { - shader->uniform3fv(LLShaderMgr::AMBIENT_LINEAR, linearColor3v(getAmbientColor() / 3.f)); // note magic number 3.f comes from SLIDER_SCALE_SUN_AMBIENT - shader->uniform3fv(LLShaderMgr::AMBIENT, LLVector3(ambient.mV)); + if (psky->getReflectionProbeAmbiance() == 0.f) + { + LLVector3 ambcol(ambient.mV); + F32 cloud_shadow = psky->getCloudShadow(); + LLVector3 tmpAmbient = ambcol + ((LLVector3::all_one - ambcol) * cloud_shadow * 0.5f); + + shader->uniform3fv(LLShaderMgr::AMBIENT_LINEAR, linearColor3v(tmpAmbient)); + shader->uniform3fv(LLShaderMgr::AMBIENT, tmpAmbient.mV); + } + else + { + shader->uniform3fv(LLShaderMgr::AMBIENT_LINEAR, linearColor3v(getAmbientColor() / 3.f)); // note magic number 3.f comes from SLIDER_SCALE_SUN_AMBIENT + shader->uniform3fv(LLShaderMgr::AMBIENT, LLVector3(ambient.mV)); + } } shader->uniform3fv(LLShaderMgr::BLUE_HORIZON_LINEAR, linearColor3v(getBlueHorizon() / 2.f)); // note magic number of 2.f comes from SLIDER_SCALE_BLUE_HORIZON_DENSITY |