diff options
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 2 | ||||
-rw-r--r-- | indra/llrender/llglslshader.h | 2 | ||||
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 16 |
3 files changed, 20 insertions, 0 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 6bea2e7a76..73ab95cf3b 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -85,6 +85,8 @@ LLShaderFeatures::LLShaderFeatures() , hasAtmospherics(false) , hasGamma(false) , hasSrgb(false) + , encodesNormal(false) + , decodesNormal(false) , mIndexedTextureChannels(0) , disableTextureIndex(false) , hasAlphaMask(false) diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index b6c54a0bf8..562cbdcba9 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -49,6 +49,8 @@ public: bool hasAtmospherics; bool hasGamma; bool hasSrgb; + bool encodesNormal; + bool decodesNormal; S32 mIndexedTextureChannels; bool disableTextureIndex; bool hasAlphaMask; 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")) |