diff options
author | Dave Houlton <euclid@lindenlab.com> | 2020-06-08 15:47:41 -0600 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-06-11 23:33:14 +0300 |
commit | 84d30655967fa29cc800783db2cd43df6f28d35e (patch) | |
tree | a1a97ffa5648a60fe19920e8e5f83f9f2673b539 /indra/llrender/llrender.cpp | |
parent | e1ea8eb7738c2f9a6762dd8c6c22de00607e8ba2 (diff) |
SL-13281, add missing srgb->linear conversion for specular
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r-- | indra/llrender/llrender.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 9b5231ad06..cabf0528f0 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -849,26 +849,32 @@ void LLTexUnit::debugTextureUnit(void) } } -void LLTexUnit::setTextureColorSpace(eTextureColorSpace space) { +void LLTexUnit::setTextureColorSpace(eTextureColorSpace space) +{ mTexColorSpace = space; #if USE_SRGB_DECODE - if (gGLManager.mHasTexturesRGBDecode) { - - if (space == TCS_SRGB) { + if (gGLManager.mHasTexturesRGBDecode) + { + if (space == TCS_SRGB) + { glTexParameteri(sGLTextureType[mCurrTexType], GL_TEXTURE_SRGB_DECODE_EXT, GL_DECODE_EXT); } - else { + else + { glTexParameteri(sGLTextureType[mCurrTexType], GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT); } - if (gDebugGL) { + if (gDebugGL) + { assert_glerror(); } } + else #endif - glTexParameteri(sGLTextureType[mCurrTexType], GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT); - + { + glTexParameteri(sGLTextureType[mCurrTexType], GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT); + } } LLLightState::LLLightState(S32 index) |