From da04af47cc6e9f6acfcac0d2d6f1466b6f9baec2 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 26 Oct 2010 16:19:24 -0500
Subject: [PATCH] Fix for bad binormals.

---
 indra/llmath/llvolume.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 0fe309ddf31..a0874e859cd 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -6139,6 +6139,14 @@ void LLVolumeFace::createBinormals()
 		LLVector2* tc = (LLVector2*) mTexCoords;
 		LLVector4a* binorm = (LLVector4a*) mBinormals;
 
+		LLVector4a* end = mBinormals+mNumVertices;
+		while (binorm < end)
+		{
+			(*binorm++).clear();
+		}
+
+		binorm = mBinormals;
+
 		for (U32 i = 0; i < mNumIndices/3; i++) 
 		{	//for each triangle
 			const U16& i0 = mIndices[i*3+0];
-- 
GitLab