summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-11-06 19:33:04 +0000
committerGraham Linden <graham@lindenlab.com>2018-11-06 19:33:04 +0000
commit2929998982f37221a58b9fa8037748a2e905f4b1 (patch)
tree24cc0c3da6655e9ed98908baa524e72068fbd64d /indra/llrender/llshadermgr.cpp
parent8c1aefc17c710b55ed7a72bd9de14cbed58ccd31 (diff)
Move to using a shared deferredUtil object for getting pos/norm from gbuffer.
Eliminate 20+ callsites with copy-paste of getPosition and/or getNorm code. Make pipeline use getShadowTarget/releaseShadowTarget consistently.
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r--indra/llrender/llshadermgr.cpp14
1 files changed, 11 insertions, 3 deletions
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"))