diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp
index 9cb3c4ce6667228ea50680212f3c517b76b73cca..e45d7a0c73ef1ce5f324b26e94ece2d8cce31ddb 100644
--- a/indra/newview/llfloaterperformance.cpp
+++ b/indra/newview/llfloaterperformance.cpp
@@ -32,6 +32,7 @@
 #include "llavataractions.h"
 #include "llavatarrendernotifier.h"
 #include "llcheckboxctrl.h"
+#include "llcombobox.h"
 #include "llfeaturemanager.h"
 #include "llfloaterpreference.h" // LLAvatarComplexityControls
 #include "llfloaterreg.h"
@@ -120,6 +121,8 @@ BOOL LLFloaterPerformance::postBuild()
 
     mSettingsPanel->getChild<LLButton>("advanced_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickAdvanced, this));
     mSettingsPanel->getChild<LLRadioGroup>("graphics_quality")->setCommitCallback(boost::bind(&LLFloaterPerformance::onChangeQuality, this, _2));
+    mSettingsPanel->getChild<LLCheckBoxCtrl>("advanced_lighting_model")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::onClickAdvancedLighting, this));
+    mSettingsPanel->getChild<LLComboBox>("ShadowDetail")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::onClickShadows, this));
 
     mNearbyPanel->getChild<LLButton>("exceptions_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickExceptions, this));
     mNearbyPanel->getChild<LLCheckBoxCtrl>("hide_avatars")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickHideAvatars, this));
@@ -540,4 +543,56 @@ void LLFloaterPerformance::onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y)
     }
 }
 
+const U32 RENDER_QUALITY_LEVEL = 3;
+void LLFloaterPerformance::changeQualityLevel(const std::string& notif)
+{
+    LLNotificationsUtil::add(notif, LLSD(), LLSD(),
+        [](const LLSD&notif, const LLSD&resp)
+    {
+        S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+        if (opt == 0)
+        {
+            LLFloaterPreference* instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
+            if (instance)
+            {
+                gSavedSettings.setU32("RenderQualityPerformance", RENDER_QUALITY_LEVEL);
+                instance->onChangeQuality(LLSD((S32)RENDER_QUALITY_LEVEL));
+            }
+        }
+    });
+}
+
+bool is_ALM_available()
+{
+    bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump");
+    bool shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
+    
+    return LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+        bumpshiny &&
+        shaders &&
+        gGLManager.mHasFramebufferObject;
+}
+
+void LLFloaterPerformance::onClickAdvancedLighting()
+{
+    if (!is_ALM_available())
+    {
+        changeQualityLevel("AdvancedLightingConfirm");
+    }
+}
+
+void LLFloaterPerformance::onClickShadows()
+{
+    if (gSavedSettings.getBOOL("AutoFPS"))
+    {
+        LLFloaterPreference::showAutoAdjustWarning();
+    }
+    else
+    {
+        if (!is_ALM_available() || !gSavedSettings.getBOOL("RenderDeferred"))
+        {
+            changeQualityLevel("ShadowsConfirm");
+        }
+    }
+}
 // EOF
diff --git a/indra/newview/llfloaterperformance.h b/indra/newview/llfloaterperformance.h
index d8288b0728e056974d35fed5e0e9af7b4abdbb22..9ccb29cd7b53646ab7d5157cf158d0cf48030aba 100644
--- a/indra/newview/llfloaterperformance.h
+++ b/indra/newview/llfloaterperformance.h
@@ -62,10 +62,14 @@ class LLFloaterPerformance : public LLFloater
     void onChangeQuality(const LLSD& data);
     void onClickHideAvatars();
     void onClickExceptions();
+    void onClickShadows();
+    void onClickAdvancedLighting();
 
     void updateMaxComplexity();
     void updateComplexityText();
 
+    static void changeQualityLevel(const std::string& notif);
+
     LLPanel* mMainPanel;
     LLPanel* mNearbyPanel;
     LLPanel* mComplexityPanel;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 2fed214d698e29d25891c4682534498384778b33..e01865a5eafe63bac6e3db7ecf885610c342b87f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1848,9 +1848,9 @@ Graphics Quality can be raised in Preferences &gt; Graphics.
   </notification>
 
   <notification
- icon="alertmodal.tga"
- name="AutoFPSConfirmDisable"
- type="alertmodal">
+   icon="alertmodal.tga"
+   name="AutoFPSConfirmDisable"
+   type="alertmodal">
     Changing this setting will disable automatic adjustment and turn off 'Auto FPS' setting.
 Are you sure you want to continue?
     <tag>confirm</tag>
@@ -1859,6 +1859,28 @@ Are you sure you want to continue?
      notext="Cancel"
      yestext="Continue"/>
   </notification>
+  <notification
+   icon="alertmodal.tga"
+   name="AdvancedLightingConfirm"
+   type="alertmodal">
+To turn on advanced lighting, we need to increase quality to level 4.
+    <tag>confirm</tag>
+  <usetemplate
+   name="okcancelbuttons"
+   notext="Cancel"
+   yestext="OK"/>
+  </notification>
+  <notification
+ icon="alertmodal.tga"
+   name="ShadowsConfirm"
+   type="alertmodal">
+To enable shadows, we need to increase quality to level 4.
+    <tag>confirm</tag>
+    <usetemplate
+     name="okcancelbuttons"
+     notext="Cancel"
+     yestext="OK"/>
+  </notification>
 
   <notification
    icon="alertmodal.tga"