summaryrefslogtreecommitdiff
path: root/indra/llrender
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
parent634910f685057c50ae3233d9f71d4b21cf958749 (diff)
parentcdc540a5c4d03b567e787b0599575693e95fac5f (diff)
Merge
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llglslshader.cpp1
-rw-r--r--indra/llrender/llglslshader.h1
-rw-r--r--indra/llrender/llshadermgr.cpp21
3 files changed, 20 insertions, 3 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 15a018a0bb..4dae61e185 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -84,6 +84,7 @@ LLShaderFeatures::LLShaderFeatures()
, isDeferred(false)
, hasIndirect(false)
, hasShadows(false)
+ , hasAmbientOcclusion(false)
, mIndexedTextureChannels(0)
, disableTextureIndex(false)
, hasAlphaMask(false)
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index ed13106bfd..56d322fe6c 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -49,6 +49,7 @@ public:
bool hasAtmospherics;
bool hasGamma;
bool hasShadows;
+ bool hasAmbientOcclusion;
bool hasSrgb;
bool encodesNormal;
bool decodesNormal;
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)
{