From 17af4ea2137b8250838ac8649ba1285ede501d9b Mon Sep 17 00:00:00 2001
From: Drake Arconis <drake@alchemyviewer.org>
Date: Sun, 16 Aug 2015 14:28:18 -0400
Subject: [PATCH] Disable alpha and pick masks on sky textures

---
 indra/llrender/llgltexture.h | 6 ++++++
 indra/newview/llvosky.cpp    | 1 +
 2 files changed, 7 insertions(+)

diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h
index bdbb3f1e76..b5dfa70e04 100644
--- a/indra/llrender/llgltexture.h
+++ b/indra/llrender/llgltexture.h
@@ -163,6 +163,12 @@ public:
 	BOOL getDontDiscard() const { return mDontDiscard; }
 	//-----------------	
 
+	void setNeedsAlphaAndPickMask(BOOL need_mask) 
+	{ 
+		if (mGLTexturep.notNull())
+			mGLTexturep->setNeedsAlphaAndPickMask(need_mask);
+	}
+
 private:
 	void cleanup();
 	void init();
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index e9d1a3a940..236eea6115 100755
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -294,6 +294,7 @@ void LLSkyTex::create(const F32 brightness)
 
 void LLSkyTex::createGLImage(S32 which)
 {	
+	mTexture[which]->setNeedsAlphaAndPickMask(FALSE);
 	mTexture[which]->createGLTexture(0, mImageRaw[which], 0, TRUE, LLGLTexture::LOCAL);
 	mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP);
 }
-- 
GitLab