diff options
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 10 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.h | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index d4e616abc2..4004793ffd 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -1437,6 +1437,16 @@ F32 LLSettingsSky::getReflectionProbeAmbiance() const return mSettings[SETTING_REFLECTION_PROBE_AMBIANCE].asReal(); } +F32 LLSettingsSky::getTotalReflectionProbeAmbiance() const +{ + // feed cloud shadow back into reflection probe ambiance to mimic pre-reflection-probe behavior + // without brightening dark/interior spaces + F32 probe_ambiance = getReflectionProbeAmbiance(); + probe_ambiance += (1.f - probe_ambiance) * getCloudShadow()*0.5f; + + return probe_ambiance; +} + F32 LLSettingsSky::getSkyBottomRadius() const { return mSettings[SETTING_SKY_BOTTOM_RADIUS].asReal(); diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h index 715d31518b..b17b32ebb1 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -133,8 +133,12 @@ public: F32 getSkyDropletRadius() const; F32 getSkyIceLevel() const; + // get the probe ambiance setting as stored in the sky settings asset F32 getReflectionProbeAmbiance() const; + // get the probe ambiance setting to use for rendering (adjusted by cloud shadow, aka cloud coverage) + F32 getTotalReflectionProbeAmbiance() const; + // Return first (only) profile layer represented in LLSD LLSD getRayleighConfig() const; LLSD getMieConfig() const; |