diff options
author | Graham Linden <graham@lindenlab.com> | 2018-12-03 15:33:15 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-12-03 15:33:15 -0800 |
commit | b6fa72d3c4d02527f6d118eadc9ba1ac48a297f5 (patch) | |
tree | 8b2025afc4049f0b8238ba994852082675ab25d1 /indra/llinventory | |
parent | 79049c49bd34d58c3a3140d4fc50f586e45f3047 (diff) |
SL-10055
Modify handling of directional light to prefer sun when it is up but use moon dir/color when it is alone in the sky.
Modify handling of shader in shaders to get some shadowing of ambient and nighttime shadowing.
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 17 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index ace530ae54..bd40760193 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -968,6 +968,23 @@ LLVector3 LLSettingsSky::getLightDirection() const return LLVector3::z_axis; } +LLColor3 LLSettingsSky::getLightDiffuse() const +{ + update(); + + // is the normal from the sun or the moon + if (getIsSunUp()) + { + return getSunDiffuse(); + } + else if (getIsMoonUp()) + { + return getMoonDiffuse(); + } + + return LLColor3::white; +} + LLColor3 LLSettingsSky::getAmbientColor() const { // Todo: this causes complications, preferably to get rid of this duality diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h index 796120ba03..bac8b52e65 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -272,6 +272,8 @@ public: bool getIsMoonUp() const; LLVector3 getLightDirection() const; + LLColor3 getLightDiffuse() const; + LLVector3 getSunDirection() const; LLVector3 getMoonDirection() const; LLColor4U getFadeColor() const; |