summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llinventory/llsettingssky.cpp1
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl2
-rw-r--r--indra/newview/llfloaterenvironmentadjust.cpp7
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp6
-rw-r--r--indra/newview/llpaneleditsky.cpp5
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml12
6 files changed, 29 insertions, 4 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 6521ec8b43..8338245897 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -1142,6 +1142,7 @@ void LLSettingsSky::setSkyIceLevel(F32 ice_level)
void LLSettingsSky::setReflectionProbeAmbiance(F32 ambiance)
{
+ mCanAutoAdjust = false; // we've now touched this sky in a "new" way, it can no longer auto adjust
setValue(SETTING_REFLECTION_PROBE_AMBIANCE, ambiance);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
index e0e97bb938..f6870c3ff0 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
@@ -110,7 +110,7 @@ void main()
// Combine
vec3 color;
color = (cloudColorSun*(1.-alpha2) + cloudColorAmbient);
- color.rgb= max(vec3(0), color.rgb);
+ color.rgb = clamp(color.rgb, vec3(0), vec3(1));
color.rgb *= 2.0;
/// Gamma correct for WL (soft clip effect).
diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp
index f9e8963479..18be4fffda 100644
--- a/indra/newview/llfloaterenvironmentadjust.cpp
+++ b/indra/newview/llfloaterenvironmentadjust.cpp
@@ -174,7 +174,8 @@ void LLFloaterEnvironmentAdjust::refresh()
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setValue(mLiveSky->getCloudNoiseTextureId());
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setValue(mLiveWater->getNormalMapID());
- getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setValue(mLiveSky->getReflectionProbeAmbiance());
+ static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
+ getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setValue(mLiveSky->getReflectionProbeAmbiance(should_auto_adjust));
LLColor3 glow(mLiveSky->getGlow());
@@ -488,7 +489,9 @@ void LLFloaterEnvironmentAdjust::onReflectionProbeAmbianceChanged()
void LLFloaterEnvironmentAdjust::updateGammaLabel()
{
if (!mLiveSky) return;
- F32 ambiance = mLiveSky->getReflectionProbeAmbiance();
+
+ static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
+ F32 ambiance = mLiveSky->getReflectionProbeAmbiance(should_auto_adjust);
if (ambiance != 0.f)
{
childSetValue("scene_gamma_label", getString("hdr_string"));
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index b9dc14ac1a..bb6584302d 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -182,6 +182,12 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p
syncronizeTabs();
refresh();
LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
+
+ // teach user about HDR settings
+ if (mSettings && ((LLSettingsSky*)mSettings.get())->canAutoAdjust())
+ {
+ LLNotificationsUtil::add("AutoAdjustHDRSky");
+ }
}
void LLFloaterFixedEnvironment::syncronizeTabs()
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index a14af27e59..761d856aae 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -36,6 +36,7 @@
#include "llsettingssky.h"
#include "llenvironment.h"
#include "llatmosphere.h"
+#include "llviewercontrol.h"
namespace
{
@@ -207,7 +208,9 @@ void LLPanelSettingsSkyAtmosTab::refresh()
F32 moisture_level = mSkySettings->getSkyMoistureLevel();
F32 droplet_radius = mSkySettings->getSkyDropletRadius();
F32 ice_level = mSkySettings->getSkyIceLevel();
- F32 rp_ambiance = mSkySettings->getReflectionProbeAmbiance();
+
+ static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
+ F32 rp_ambiance = mSkySettings->getReflectionProbeAmbiance(should_auto_adjust);
getChild<LLUICtrl>(FIELD_SKY_DENSITY_MOISTURE_LEVEL)->setValue(moisture_level);
getChild<LLUICtrl>(FIELD_SKY_DENSITY_DROPLET_RADIUS)->setValue(droplet_radius);
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 4949075f2d..f77b235408 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -12097,5 +12097,17 @@ Material successfully created. Asset ID: [ASSET_ID]
notext="Cancel"
yestext="OK"/>
</notification>
+
+ <notification
+ icon="notifytip.tga"
+ name="AutoAdjustHDRSky"
+ persist="true"
+ type="alertmodal">
+ You are editing a non-HDR sky that has been automatically converted to HDR. To remove HDR and tone mapping, set Reflection Probe Ambiance to zero.
+ <usetemplate
+ ignoretext="HDR Sky adjustment warning"
+ name="okignore"
+ yestext="OK"/>
+ </notification>
</notifications>