summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
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)
{