diff options
author | Rider Linden <rider@lindenlab.com> | 2018-12-12 14:07:56 -0800 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-12-12 14:07:56 -0800 |
commit | 9475a593a170f0c90a8d353de3e1277f844ee913 (patch) | |
tree | 1d32cc3383b13fc51e2f6b7f03d50b7e0f63aa1b /indra/llinventory/llsettingssky.cpp | |
parent | 70ac8d9fa7049891ed1b65f68f112127dfb5f5f7 (diff) | |
parent | 1cc8286c2097fb0896d40df6fe8ef311fa4c92ef (diff) |
Merge
Diffstat (limited to 'indra/llinventory/llsettingssky.cpp')
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 37882b91ec..231077c217 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -980,6 +980,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 |