From 961d52fbd3d8f5cc14aad2da93455e9e21873793 Mon Sep 17 00:00:00 2001
From: "Graham Madarasz (Graham Linden)" <graham@lindenlab.com>
Date: Mon, 1 Apr 2013 12:31:20 -0700
Subject: [PATCH] NORSPEC-47 alpha mode enabled for textures without alpha
 channels

---
 indra/newview/llpanelface.cpp | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 754a13dd4c9..0d7b4b88c92 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -694,7 +694,24 @@ void LLPanelFace::getState()
 				}
 			} func2;
 			identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func2, image_format );
-			mIsAlpha = image_format != GL_RGB;
+            
+            mIsAlpha = FALSE;
+            switch (image_format)
+            {
+                case GL_RGBA:
+                case GL_ALPHA:
+                {
+                    mIsAlpha = TRUE;
+                }
+                break;
+
+                case GL_RGB: break;
+                default:
+                {
+                    llwarns << "Unexpected tex format in LLPanelFace...resorting to no alpha" << llendl;
+                }
+                break;
+            }
 
 			if(LLViewerMedia::textureHasMedia(id))
 			{
-- 
GitLab