diff options
| author | Rider Linden <rider@lindenlab.com> | 2019-04-02 18:06:37 +0000 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2019-04-02 18:06:37 +0000 |
| commit | d7b47bf71f84e4d7311a532b4bfa4a3795f19ab9 (patch) | |
| tree | 7bbe7116f4a6e53127286d8cb8dcf090f64915b2 /indra/llrender/llglslshader.cpp | |
| parent | 1199d139810f49de6052ceb90b4359042eb9a639 (diff) | |
| parent | 3a42d2b94a0f2d27b4baef63abaf49e64139ff01 (diff) | |
Merged in Geenz/viewer-eep (pull request #321)
[WIP] Use EXT_texture_sRGB_decode in order to selectively sample textures consumed by the deferred renderer as sRGB
Approved-by: Graham Madarasz <graham@lindenlab.com>
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
| -rw-r--r-- | indra/llrender/llglslshader.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 8f3a56e1cf..f8b5dd0559 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -974,7 +974,7 @@ S32 LLGLSLShader::unbindTexture(S32 uniform, LLTexUnit::eTextureType mode) return uniform; } -S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode) +S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace space) { if (uniform < 0 || uniform >= (S32)mTexture.size()) { @@ -986,11 +986,12 @@ S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode) { gGL.getTexUnit(index)->activate(); gGL.getTexUnit(index)->enable(mode); + gGL.getTexUnit(index)->setTextureColorSpace(space); } return index; } -S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode) +S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace space) { if (uniform < 0 || uniform >= (S32)mTexture.size()) { @@ -1000,7 +1001,7 @@ S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode) S32 index = mTexture[uniform]; if (index != -1 && gGL.getTexUnit(index)->getCurrType() != LLTexUnit::TT_NONE) { - if (gDebugGL && gGL.getTexUnit(index)->getCurrType() != mode) + if (gDebugGL && gGL.getTexUnit(index)->getCurrType() != mode && gGL.getTexUnit(index)->getCurrColorSpace() != space) { if (gDebugSession) { |
