summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/featuretable.txt12
-rw-r--r--indra/newview/featuretable_linux.txt13
-rw-r--r--indra/newview/featuretable_mac.txt13
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp136
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp33
-rw-r--r--indra/newview/llfloaterpreference.cpp19
-rw-r--r--indra/newview/llfloaterpreference.h1
-rw-r--r--indra/newview/pipeline.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml14
9 files changed, 167 insertions, 78 deletions
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index e99b94f150..1d6fb82d10 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -66,6 +66,7 @@ RenderCompressTextures 1 1
RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 1
RenderShadowDetail 1 2
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
@@ -98,6 +99,7 @@ VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 0
@@ -129,6 +131,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 0
@@ -159,6 +162,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 0
@@ -189,6 +193,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -219,6 +224,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 1
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -249,6 +255,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -279,6 +286,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 2
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -309,6 +317,7 @@ WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 1
RenderShadowDetail 1 2
RenderFSAASamples 1 2
@@ -320,6 +329,7 @@ RenderVBOEnable 1 0
RenderShadowDetail 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
//
// Class 0 Hardware (just old)
@@ -375,6 +385,7 @@ WindLightUseAtmosShaders 0 0
RenderDeferred 0 0
RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
+RenderUseAdvancedAtmospherics 0 0
//
// No Vertex Shaders available
@@ -388,6 +399,7 @@ WindLightUseAtmosShaders 0 0
RenderDeferred 0 0
RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
+RenderUseAdvancedAtmospherics 0 0
//
// GL_ARB_map_buffer_range exists
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 801a622e93..18feae162f 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -66,6 +66,7 @@ RenderCompressTextures 1 1
RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 1
RenderShadowDetail 1 2
RenderFSAASamples 1 16
RenderMaxTextureIndex 1 16
@@ -97,6 +98,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 0
@@ -128,6 +130,7 @@ VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 0
@@ -158,6 +161,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 0
@@ -188,6 +192,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -217,6 +222,7 @@ RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 1
+RenderUseAdvancedAtmospherics 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
@@ -248,6 +254,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -278,6 +285,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 2
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -308,6 +316,7 @@ WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 1
RenderShadowDetail 1 2
RenderFSAASamples 1 2
@@ -319,6 +328,7 @@ RenderVBOEnable 1 0
RenderShadowDetail 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
//
// Class 0 Hardware (just old)
@@ -373,6 +383,7 @@ VertexShaderEnable 0 0
WindLightUseAtmosShaders 0 0
RenderDeferred 0 0
RenderDeferredSSAO 0 0
+RenderUseAdvancedAtmospherics 0 0
RenderShadowDetail 0 0
//
@@ -386,6 +397,7 @@ VertexShaderEnable 0 0
WindLightUseAtmosShaders 0 0
RenderDeferred 0 0
RenderDeferredSSAO 0 0
+RenderUseAdvancedAtmospherics 0 0
RenderShadowDetail 0 0
//
@@ -413,6 +425,7 @@ RenderReflectionDetail 0 0
WindLightUseAtmosShaders 0 0
RenderDeferred 0 0
RenderDeferredSSAO 0 0
+RenderUseAdvancedAtmospherics 0 0
RenderShadowDetail 0 0
//
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 1f891ee4d7..3f5edede98 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -66,6 +66,7 @@ RenderCompressTextures 1 1
RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 1
RenderShadowDetail 1 2
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
@@ -98,6 +99,7 @@ VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 0
@@ -129,6 +131,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 0
@@ -159,6 +162,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 0
@@ -189,6 +193,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -219,6 +224,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 1
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -249,6 +255,7 @@ VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 0
RenderShadowDetail 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -280,6 +287,7 @@ WindLightUseAtmosShaders 1 1
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
+RenderUseAdvancedAtmospherics 1 0
WLSkyDetail 1 48
RenderFSAASamples 1 2
@@ -309,6 +317,7 @@ WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
+RenderUseAdvancedAtmospherics 1 1
RenderShadowDetail 1 2
RenderFSAASamples 1 2
@@ -320,6 +329,7 @@ RenderVBOEnable 1 0
RenderShadowDetail 1 0
RenderDeferred 1 0
RenderDeferredSSAO 1 0
+RenderUseAdvancedAtmospherics 1 0
//
// Class 0 Hardware (just old)
@@ -368,6 +378,7 @@ VertexShaderEnable 0 0
WindLightUseAtmosShaders 0 0
RenderDeferred 0 0
RenderDeferredSSAO 0 0
+RenderUseAdvancedAtmospherics 0 0
RenderShadowDetail 0 0
//
@@ -381,6 +392,7 @@ VertexShaderEnable 0 0
WindLightUseAtmosShaders 0 0
RenderDeferred 0 0
RenderDeferredSSAO 0 0
+RenderUseAdvancedAtmospherics 0 0
RenderShadowDetail 0 0
//
@@ -407,6 +419,7 @@ RenderReflectionDetail 0 0
WindLightUseAtmosShaders 0 0
RenderDeferred 0 0
RenderDeferredSSAO 0 0
+RenderUseAdvancedAtmospherics 0 0
RenderShadowDetail 0 0
//
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 41bf024942..0d49c5a339 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -230,10 +230,9 @@ void LLDrawPoolWLSky::renderStars(void) const
// clamping and allow the star_alpha param to brighten the stars.
LLColor4 star_alpha(LLColor4::black);
- // *LAPRAS
- star_alpha.mV[3] = LLEnvironment::instance().getCurrentSky()->getStarBrightness() / (2.f + ((rand() >> 16)/65535.0f)); // twinkle twinkle
-
- // If start_brightness is not set, exit
+ star_alpha.mV[3] = LLEnvironment::instance().getCurrentSky()->getStarBrightness() / 512.f;
+
+ // If star brightness is not set, exit
if( star_alpha.mV[3] < 0.001 )
{
LL_DEBUGS("SKY") << "star_brightness below threshold." << LL_ENDL;
@@ -293,9 +292,8 @@ void LLDrawPoolWLSky::renderStarsDeferred(void) const
LLGLSPipelineSkyBox gls_sky;
LLGLEnable blend(GL_BLEND);
gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
-
- // *LAPRAS
- F32 star_alpha = LLEnvironment::instance().getCurrentSky()->getStarBrightness() / (2.f + ((rand() >> 16)/65535.0f)); // twinkle twinkle
+
+ F32 star_alpha = LLEnvironment::instance().getCurrentSky()->getStarBrightness() / 512.0f;
// If start_brightness is not set, exit
if(star_alpha < 0.001f)
@@ -332,6 +330,11 @@ void LLDrawPoolWLSky::renderStarsDeferred(void) const
gDeferredStarProgram.uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor);
gDeferredStarProgram.uniform1f(sCustomAlpha, star_alpha);
+
+ sStarTime = (F32)LLFrameTimer::getElapsedSeconds() * 0.5f;
+
+ gDeferredStarProgram.uniform1f(LLShaderMgr::WATER_TIME, sStarTime);
+
gSky.mVOWLSkyp->drawStars();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -375,6 +378,8 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
F32 blend_factor = LLEnvironment::instance().getCurrentSky()->getBlendFactor();
bool can_use_vertex_shaders = gPipeline.canUseVertexShaders();
+ bool can_use_windlight_shaders = gPipeline.canUseWindLightShaders();
+
if (gSky.mVOSkyp->getSun().getDraw() && face && face->getGeomCount())
{
@@ -388,45 +393,39 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
if (tex_a || tex_b)
{
// if and only if we have a texture defined, render the sun disc
- if (can_use_vertex_shaders)
- {
- sun_shader->bind();
- }
-
- if (tex_a && (!tex_b || (tex_a == tex_b)))
+ if (can_use_vertex_shaders && can_use_windlight_shaders)
{
- // Bind current and next sun textures
- sun_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
- blend_factor = 0;
- }
- else if (tex_b && !tex_a)
- {
- sun_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
- blend_factor = 0;
- }
- else if (tex_b != tex_a)
- {
- sun_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
- sun_shader->bindTexture(LLShaderMgr::ALTERNATE_DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
- }
-
- LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor());
+ sun_shader->bind();
+
+ if (tex_a && (!tex_b || (tex_a == tex_b)))
+ {
+ // Bind current and next sun textures
+ sun_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
+ blend_factor = 0;
+ }
+ else if (tex_b && !tex_a)
+ {
+ sun_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
+ blend_factor = 0;
+ }
+ else if (tex_b != tex_a)
+ {
+ sun_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
+ sun_shader->bindTexture(LLShaderMgr::ALTERNATE_DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
+ }
+
+ LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor());
- if (can_use_vertex_shaders)
- {
sun_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV);
sun_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor);
- }
- LLFacePool::LLOverrideFaceColor color_override(this, color);
- face->renderIndexed();
+ LLFacePool::LLOverrideFaceColor color_override(this, color);
+ face->renderIndexed();
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
- if (can_use_vertex_shaders)
- {
- sun_shader->unbind();
+ sun_shader->unbind();
}
}
}
@@ -440,46 +439,39 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
LLColor4 color(gSky.mVOSkyp->getMoon().getInterpColor());
- if (can_use_vertex_shaders)
- {
- moon_shader->bind();
- }
-
- if (tex_a && (!tex_b || (tex_a == tex_b)))
+ if (can_use_vertex_shaders && can_use_windlight_shaders)
{
- // Bind current and next sun textures
- moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
- blend_factor = 0;
- }
- else if (tex_b && !tex_a)
- {
- moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
- blend_factor = 0;
- }
- else if (tex_b != tex_a)
- {
- moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
- moon_shader->bindTexture(LLShaderMgr::ALTERNATE_DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
- }
+ moon_shader->bind();
+
+ if (tex_a && (!tex_b || (tex_a == tex_b)))
+ {
+ // Bind current and next sun textures
+ moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
+ blend_factor = 0;
+ }
+ else if (tex_b && !tex_a)
+ {
+ moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
+ blend_factor = 0;
+ }
+ else if (tex_b != tex_a)
+ {
+ moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE);
+ moon_shader->bindTexture(LLShaderMgr::ALTERNATE_DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE);
+ }
- if (can_use_vertex_shaders)
- {
moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV);
moon_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor);
- }
- LLFacePool::LLOverrideFaceColor color_override(this, color);
-
- face->renderIndexed();
+ LLFacePool::LLOverrideFaceColor color_override(this, color);
+ face->renderIndexed();
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
- if (can_use_vertex_shaders)
- {
- moon_shader->unbind();
- }
- }
+ moon_shader->unbind();
+ }
+ }
gGL.popMatrix();
}
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 7b5a848188..d4f0c934e7 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -195,13 +195,30 @@ BOOL LLFloaterEditExtDayCycle::postBuild()
LLTabContainer* tab_container = mSkyTabLayoutContainer->getChild<LLTabContainer>("sky_tabs");
S32 tab_count = tab_container->getTabCount();
+ LLSettingsEditPanel *panel = nullptr;
for (S32 idx = 0; idx < tab_count; ++idx)
{
- LLSettingsEditPanel *panel = static_cast<LLSettingsEditPanel *>(tab_container->getPanelByIndex(idx));
+ panel = static_cast<LLSettingsEditPanel *>(tab_container->getPanelByIndex(idx));
if (panel)
panel->setOnDirtyFlagChanged([this](LLPanel *, bool val) { onPanelDirtyFlagChanged(val); });
}
+ panel = dynamic_cast<LLPanelSettingsSkyDensityTab*>(tab_container->getChildView("advanced_atmo_panel"));
+ if (panel)
+ {
+ if (gSavedSettings.getBOOL("RenderUseAdvancedAtmospherics"))
+ {
+ panel->setEnabled(true);
+ panel->setAllChildrenEnabled(true);
+ }
+ else
+ {
+ panel->setEnabled(false);
+ panel->setAllChildrenEnabled(false);
+ panel->setVisible(false);
+ }
+ }
+
tab_container = mWaterTabLayoutContainer->getChild<LLTabContainer>("water_tabs");
tab_count = tab_container->getTabCount();
@@ -833,6 +850,7 @@ void LLFloaterEditExtDayCycle::updateSkyTabs(const LLSettingsSkyPtr_t &p_sky)
}
else
{
+ panel->setEnabled(false);
panel->setVisible(false);
}
}
@@ -875,8 +893,17 @@ void LLFloaterEditExtDayCycle::setSkyTabsEnabled(BOOL enable)
panel = dynamic_cast<LLPanelSettingsSkyDensityTab*>(tab_container->getChildView("advanced_atmo_panel"));
if (panel)
{
- panel->setEnabled(enable);
- panel->setAllChildrenEnabled(enable);
+ if (gSavedSettings.getBOOL("RenderUseAdvancedAtmospherics"))
+ {
+ panel->setEnabled(enable);
+ panel->setAllChildrenEnabled(enable);
+ }
+ else
+ {
+ panel->setEnabled(false);
+ panel->setAllChildrenEnabled(false);
+ panel->setVisible(false);
+ }
}
}
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 4ce35643b1..8a01eea912 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -811,6 +811,17 @@ void LLFloaterPreferenceGraphicsAdvanced::onVertexShaderEnable()
refreshEnabledGraphics();
}
+void LLFloaterPreferenceGraphicsAdvanced::onAdvancedAtmosphericsEnable()
+{
+ LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->refresh();
+ }
+
+ refreshEnabledGraphics();
+}
+
void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledGraphics()
{
refreshEnabledState();
@@ -1351,6 +1362,11 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
ctrl_ssao->setEnabled(enabled);
ctrl_dof->setEnabled(enabled);
+ LLCheckBoxCtrl* ctrl_advanced_atmo = getChild<LLCheckBoxCtrl>("UseAdvancedAtmo");
+
+ bool advanced_atmo_enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseAdvancedAtmospherics");
+ ctrl_advanced_atmo->setEnabled(advanced_atmo_enabled);
+
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail");
ctrl_shadow->setEnabled(enabled);
@@ -2714,7 +2730,8 @@ void LLPanelPreferenceGraphics::setHardwareDefaults()
LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const LLSD& key)
: LLFloater(key)
{
- mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onVertexShaderEnable, this));
+ mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onVertexShaderEnable, this));
+ mCommitCallbackRegistrar.add("Pref.AdvancedAtmosphericsEnable", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onAdvancedAtmosphericsEnable, this));
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxNonImpostors", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateMaxNonImpostors,this));
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxComplexity", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateMaxComplexity,this));
}
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 8339a18296..973ca25c37 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -295,6 +295,7 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater
void refresh();
// callback for when client turns on shaders
void onVertexShaderEnable();
+ void onAdvancedAtmosphericsEnable();
LOG_CLASS(LLFloaterPreferenceGraphicsAdvanced);
};
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bfb7eb3f6a..d265ba9fb8 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -424,8 +424,7 @@ void LLPipeline::init()
gOctreeMinSize = gSavedSettings.getF32("OctreeMinimumNodeSize");
sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD");
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
- sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
- sUseAdvancedAtmospherics = gSavedSettings.getBOOL("RenderUseAdvancedAtmospherics");
+ sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO");
LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO");
LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw");
@@ -1049,6 +1048,7 @@ void LLPipeline::refreshCachedSettings()
RenderAvatarVP = gSavedSettings.getBOOL("RenderAvatarVP");
WindLightUseAtmosShaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
RenderDeferred = gSavedSettings.getBOOL("RenderDeferred");
+ sUseAdvancedAtmospherics = gSavedSettings.getBOOL("RenderUseAdvancedAtmospherics");
RenderDeferredSunWash = gSavedSettings.getF32("RenderDeferredSunWash");
RenderFSAASamples = gSavedSettings.getU32("RenderFSAASamples");
RenderResolutionDivisor = gSavedSettings.getU32("RenderResolutionDivisor");
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index c2500951a6..d9bbf32583 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -819,6 +819,20 @@
function="Pref.VertexShaderEnable" />
</check_box>
+ <check_box
+ control_name="RenderUseAdvancedAtmospherics"
+ height="16"
+ initial_value="true"
+ label="Advanced Atmospherics"
+ layout="topleft"
+ left="480"
+ name="UseAdvancedAtmo"
+ top_delta="16"
+ width="240">
+ <check_box.commit_callback
+ function="Pref.AdvancedAtmosphericsEnable" />
+ </check_box>
+
<text
type="string"
length="1"