summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-03-12 17:52:04 +0100
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-03-12 17:52:04 +0100
commit98b2fed85fd459012ed2b859ea40a3f56d27c0e8 (patch)
tree74c478cf0c9526d382cbaae00c0bc6f13d5968b1 /indra/llrender/llshadermgr.cpp
parentcf460b13bee894684d0ca1bcb5bbc9eb38df719c (diff)
De-duplicate shader code for encoding and decoding normals to/from gbuffer format.
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r--indra/llrender/llshadermgr.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 6c816d0dc4..3bac545b5f 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -213,6 +213,22 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
}
}
+ if (features->encodesNormal)
+ {
+ if (!shader->attachObject("environment/encodeNormF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+
+ if (features->decodesNormal)
+ {
+ if (!shader->attachObject("environment/decodeNormF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+
if (features->hasAtmospherics)
{
if (!shader->attachObject("windlight/atmosphericsF.glsl"))