summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-05-18 23:14:56 +0100
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-05-18 23:14:56 +0100
commit8082cb86682c008389cb8127f295e6566ec368e5 (patch)
treee8168fc436aa4aaf5274719c917a64fee0af0a54 /indra/newview/llviewershadermgr.cpp
parent242fe0610996696a026dc2dc9b1b42c4db2f852c (diff)
Make nighttime elev constant _SIN, since it uses a sin value.
Put that constant in sky settings and eliminate dups. Fix up logic around when to use heavenly bodies (fix broken moon in basic sky). Remove unnecessary clip to horizon. Put in temp code to ena/dis sun/moon based on LLEnvironment::getIsDaytime().
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r--indra/newview/llviewershadermgr.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 95e4f27a39..40cf4c82e6 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -46,6 +46,8 @@
#include "llenvironment.h"
#include "llatmosphere.h"
+#pragma optimize("", off)
+
#ifdef LL_RELEASE_FOR_DOWNLOAD
#define UNIFORM_ERRS LL_WARNS_ONCE("Shader")
#else
@@ -509,8 +511,9 @@ void LLViewerShaderMgr::setShaders()
wl_class = llmin(wl_class, 2);
}
- if (!(LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders")
- && gSavedSettings.getBOOL("WindLightUseAtmosShaders")))
+ bool hasWindLightShaders = LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders");
+ bool useWindLightShaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
+ if (!hasWindLightShaders || !useWindLightShaders)
{
// user has disabled WindLight in their settings, downgrade
// windlight shaders to stub versions.
@@ -544,7 +547,6 @@ void LLViewerShaderMgr::setShaders()
// Load all shaders to set max levels
loaded = loadShadersEnvironment();
- llassert(loaded);
if (loaded)
{