From 14c7108ca3f646a8f7fd0d024ca200919bbf79bf Mon Sep 17 00:00:00 2001
From: Graham Linden <graham@lindenlab.com>
Date: Sat, 3 Aug 2013 06:52:56 -0700
Subject: [PATCH] NORSPEC-304 NORSPEC-334 NORSPEC-336 fix black glow overdraw
 without breaking glow

---
 indra/newview/lldrawpoolalpha.cpp | 5 +----
 indra/newview/llvovolume.cpp      | 5 ++++-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 1cc81fa8632..237579cec57 100755
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -545,10 +545,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
 
 					emissive_shader->bind();
 					
-					U32 final_mask = params.mFullbright ? (mask | LLVertexBuffer::MAP_EMISSIVE)
-																	: ((mask & ~LLVertexBuffer::MAP_COLOR) | LLVertexBuffer::MAP_EMISSIVE);
-
-					params.mVertexBuffer->setBuffer(final_mask);
+					params.mVertexBuffer->setBuffer((mask & ~LLVertexBuffer::MAP_COLOR) | LLVertexBuffer::MAP_EMISSIVE);
 					
 					// do the actual drawing, again
 					params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 406591046fa..3eb5b19de59 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4881,7 +4881,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 	if (emissive)
 	{ //emissive faces are present, include emissive byte to preserve batching
 		simple_mask = simple_mask | LLVertexBuffer::MAP_EMISSIVE;
-		alpha_mask = alpha_mask | LLVertexBuffer::MAP_EMISSIVE;
+		
+		// doing this seems to cause NORSPEC-304
+		//alpha_mask = alpha_mask | LLVertexBuffer::MAP_EMISSIVE;
+
 		bump_mask = bump_mask | LLVertexBuffer::MAP_EMISSIVE;
 		fullbright_mask = fullbright_mask | LLVertexBuffer::MAP_EMISSIVE;
 		norm_mask = norm_mask | LLVertexBuffer::MAP_EMISSIVE;
-- 
GitLab