summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llglslshader.cpp3
-rw-r--r--indra/llrender/llglslshader.h4
-rw-r--r--indra/llrender/llshadermgr.cpp14
3 files changed, 17 insertions, 4 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index de15d1d75b..585f8f6504 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -81,6 +81,9 @@ LLShaderFeatures::LLShaderFeatures()
, hasSrgb(false)
, encodesNormal(false)
, decodesNormal(false)
+ , isDeferred(false)
+ , hasIndirect(false)
+ , hasShadows(false)
, mIndexedTextureChannels(0)
, disableTextureIndex(false)
, hasAlphaMask(false)
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 0934ceba30..ed13106bfd 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -48,9 +48,12 @@ public:
bool hasObjectSkinning;
bool hasAtmospherics;
bool hasGamma;
+ bool hasShadows;
bool hasSrgb;
bool encodesNormal;
bool decodesNormal;
+ bool isDeferred;
+ bool hasIndirect;
S32 mIndexedTextureChannels;
bool disableTextureIndex;
bool hasAlphaMask;
@@ -227,5 +230,4 @@ extern LLGLSLShader gSolidColorProgram;
//Alpha mask shader (declared here so llappearance can access properly)
extern LLGLSLShader gAlphaMaskProgram;
-
#endif
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index d6fe35e2ca..55e4ecda2a 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -186,15 +186,23 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
}
}
- if (features->calculatesLighting || features->calculatesAtmospherics)
+ // NOTE order of shader object attaching is VERY IMPORTANT!!!
+ if (features->isDeferred || features->hasShadows)
{
- if (!shader->attachObject("windlight/atmosphericsHelpersF.glsl"))
+ if (!shader->attachObject("deferred/deferredUtil.glsl"))
+ {
+ return FALSE;
+ }
+ }
+
+ if (features->hasIndirect)
+ {
+ if (!shader->attachObject("deferred/indirect.glsl"))
{
return FALSE;
}
}
- // NOTE order of shader object attaching is VERY IMPORTANT!!!
if (features->hasGamma)
{
if (!shader->attachObject("windlight/gammaF.glsl"))