From c4032528aff8ef1938e897ec583bbf25a3e713e1 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 2 May 2019 13:49:35 -0700 Subject: Roll back sRGB decode changes from contrib for now. Fix direct light matching across alpha/blended-material/deferred. Get diffuse lighting to match from Low to Ultra. --- indra/llrender/llimagegl.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/llrender/llimagegl.cpp') diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 2f1f702d2c..790ba25112 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1385,22 +1385,28 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S mFormatType = GL_UNSIGNED_BYTE; break; case 3: + #if USE_SRGB_DECODE if (gGLManager.mHasTexturesRGBDecode) { mFormatInternal = GL_SRGB8; } - else { + else + #endif + { mFormatInternal = GL_RGB8; } mFormatPrimary = GL_RGB; mFormatType = GL_UNSIGNED_BYTE; break; case 4: + #if USE_SRGB_DECODE if (gGLManager.mHasTexturesRGBDecode) { mFormatInternal = GL_SRGB8_ALPHA8; } - else { + else + #endif + { mFormatInternal = GL_RGBA8; } mFormatPrimary = GL_RGBA; -- cgit v1.2.3