summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-12-17 14:39:40 -0800
committerGraham Linden <graham@lindenlab.com>2018-12-17 14:39:40 -0800
commit765ad6bb7e65dc66032d0ac45e7386f995167db7 (patch)
tree530112a72d81480ffa23a6989cdf8b109951d6de /indra/llrender/llshadermgr.cpp
parent634910f685057c50ae3233d9f71d4b21cf958749 (diff)
parentcdc540a5c4d03b567e787b0599575693e95fac5f (diff)
Merge
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r--indra/llrender/llshadermgr.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 3a80ff0144..29d120a135 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -196,8 +196,8 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
}
}
-#if USE_DEFERRED_SHADER_API
- if (features->isDeferred || features->hasShadows)
+ // we want this BEFORE shadows and AO because those facilities use pos/norm access
+ if (features->isDeferred || features->hasShadows || features->hasAmbientOcclusion)
{
if (!shader->attachObject("deferred/deferredUtil.glsl"))
{
@@ -205,6 +205,22 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
}
}
+ if (features->hasShadows)
+ {
+ if (!shader->attachObject("deferred/shadowUtil.glsl"))
+ {
+ return FALSE;
+ }
+ }
+
+ if (features->hasAmbientOcclusion)
+ {
+ if (!shader->attachObject("deferred/aoUtil.glsl"))
+ {
+ return FALSE;
+ }
+ }
+
if (features->hasIndirect)
{
if (!shader->attachObject("deferred/indirect.glsl"))
@@ -212,7 +228,6 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
return FALSE;
}
}
-#endif
if (features->hasGamma)
{