From bf6182daa8b4d7cea79310547f71d7a3155e17b0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 07:50:08 -0700 Subject: Update Mac and Windows breakpad builds to latest --- indra/newview/llvopartgroup.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/newview/llvopartgroup.cpp (limited to 'indra/newview/llvopartgroup.cpp') diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp old mode 100644 new mode 100755 -- cgit v1.2.3 From 66b4900e70db9bf6244faee0bcde63060302f9fe Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 11 Apr 2013 15:17:55 -0500 Subject: Pass binormal masks in on particles and in lldrawpoolalpha --- indra/newview/llvopartgroup.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvopartgroup.cpp') diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 0b34bbb90f..675ba685b4 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -65,7 +65,9 @@ void LLVOPartGroup::initClass() //static void LLVOPartGroup::restoreGL() { - sVB = new LLVertexBuffer(VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); + + //TODO: optimize out binormal mask here + sVB = new LLVertexBuffer(VERTEX_DATA_MASK | LLVertexBuffer::MAP_BINORMAL, GL_STREAM_DRAW_ARB); U32 count = LL_MAX_PARTICLE_COUNT; sVB->allocateBuffer(count*4, count*6, true); -- cgit v1.2.3 From 39544a3b06e3221602444eb81c7df8c1030c6bb5 Mon Sep 17 00:00:00 2001 From: Geenz Date: Mon, 15 Apr 2013 02:29:03 -0400 Subject: Hooked up normal and specular texture coordinates. --- indra/newview/llvopartgroup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvopartgroup.cpp') diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 675ba685b4..65711d2339 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -66,8 +66,8 @@ void LLVOPartGroup::initClass() void LLVOPartGroup::restoreGL() { - //TODO: optimize out binormal mask here - sVB = new LLVertexBuffer(VERTEX_DATA_MASK | LLVertexBuffer::MAP_BINORMAL, GL_STREAM_DRAW_ARB); + //TODO: optimize out binormal mask here. Specular and normal coords as well. + sVB = new LLVertexBuffer(VERTEX_DATA_MASK | LLVertexBuffer::MAP_BINORMAL | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2, GL_STREAM_DRAW_ARB); U32 count = LL_MAX_PARTICLE_COUNT; sVB->allocateBuffer(count*4, count*6, true); -- cgit v1.2.3 From c3f14b915c38a4978745f12f1f816572cce4b5a0 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 3 Jun 2013 12:50:48 -0500 Subject: NORSPEC-229 Fix for bad binormals on mirrored surfaces (use tangent calculator instead of binormal calculator, convert binormal centric code to tangent centric) --- indra/newview/llvopartgroup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvopartgroup.cpp') diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 65711d2339..6a7f26bdb5 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -67,7 +67,7 @@ void LLVOPartGroup::restoreGL() { //TODO: optimize out binormal mask here. Specular and normal coords as well. - sVB = new LLVertexBuffer(VERTEX_DATA_MASK | LLVertexBuffer::MAP_BINORMAL | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2, GL_STREAM_DRAW_ARB); + sVB = new LLVertexBuffer(VERTEX_DATA_MASK | LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2, GL_STREAM_DRAW_ARB); U32 count = LL_MAX_PARTICLE_COUNT; sVB->allocateBuffer(count*4, count*6, true); -- cgit v1.2.3 From d2b253f1f6072beead770519849ad3b18a1a4359 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 12 Jun 2013 09:16:19 -0700 Subject: Changes to protect against use of normalize3fast on degenerate vectors --- indra/newview/llvopartgroup.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llvopartgroup.cpp') diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 6a7f26bdb5..b25213d85f 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -411,14 +411,21 @@ void LLVOPartGroup::getGeometry(S32 idx, LLVector4a right; right.setCross3(at, up); + // guard against NaNs in normalize below + llassert(right.dot3(right).getF32() > F_APPROXIMATELY_ZERO); right.normalize3fast(); + up.setCross3(right, at); + // guard against NaNs in normalize below + llassert(up.dot3(up).getF32() > F_APPROXIMATELY_ZERO); up.normalize3fast(); if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK) { LLVector4a normvel; normvel.load3(part.mVelocity.mV); + // guard against NaNs in normalize below + llassert(normvel.dot3(normvel).getF32() > F_APPROXIMATELY_ZERO); normvel.normalize3fast(); LLVector2 up_fracs; up_fracs.mV[0] = normvel.dot3(right).getF32(); @@ -443,6 +450,9 @@ void LLVOPartGroup::getGeometry(S32 idx, up = new_up; right = t; + // guard against NaNs in normalize below + llassert(up.dot3(up).getF32() > F_APPROXIMATELY_ZERO); + llassert(right.dot3(right).getF32() > F_APPROXIMATELY_ZERO); up.normalize3fast(); right.normalize3fast(); } -- cgit v1.2.3 From 3eb460f772e8a1cf45d53ed1d06206bfd74a780a Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 12 Jun 2013 12:25:30 -0700 Subject: Remove NaN guards from vopartgroup and volume code --- indra/newview/llvopartgroup.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'indra/newview/llvopartgroup.cpp') diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index b25213d85f..43a5ddba42 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -411,21 +411,15 @@ void LLVOPartGroup::getGeometry(S32 idx, LLVector4a right; right.setCross3(at, up); - // guard against NaNs in normalize below - llassert(right.dot3(right).getF32() > F_APPROXIMATELY_ZERO); right.normalize3fast(); up.setCross3(right, at); - // guard against NaNs in normalize below - llassert(up.dot3(up).getF32() > F_APPROXIMATELY_ZERO); up.normalize3fast(); if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK) { LLVector4a normvel; normvel.load3(part.mVelocity.mV); - // guard against NaNs in normalize below - llassert(normvel.dot3(normvel).getF32() > F_APPROXIMATELY_ZERO); normvel.normalize3fast(); LLVector2 up_fracs; up_fracs.mV[0] = normvel.dot3(right).getF32(); @@ -450,9 +444,6 @@ void LLVOPartGroup::getGeometry(S32 idx, up = new_up; right = t; - // guard against NaNs in normalize below - llassert(up.dot3(up).getF32() > F_APPROXIMATELY_ZERO); - llassert(right.dot3(right).getF32() > F_APPROXIMATELY_ZERO); up.normalize3fast(); right.normalize3fast(); } -- cgit v1.2.3