diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-09-08 12:56:44 -0400 | 
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-09-08 12:56:44 -0400 | 
| commit | 9d44aaab46eff6d16ff50d8b6c12df821f637761 (patch) | |
| tree | 943fb63f9f45e11b10cb85629b0d95ffc9415e9e /indra | |
| parent | 5cacd71c07cd4202784ebf2f826239b4529787ba (diff) | |
SL-216 WIP, SL-220 WIP - stray triangles in hw skinning path
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/newview/lldrawpoolavatar.cpp | 16 | 
1 files changed, 15 insertions, 1 deletions
| diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 6c9107cb76..9dd4c2ce0d 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1639,7 +1639,21 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*  				scale += wght[k];  			} -			wght *= 1.f/scale; +            if (scale > 0.f) +            { +                wght *= 1.f/scale; +            } +            else +            { +                // Complete weighting fail - all zeroes.  Just +                // pick some values that add up to 1.0 so we +                // don't wind up with garbage vertices +                // pointing off at (0,0,0) +                wght[0] = 1.f; +                wght[1] = 0.f; +                wght[2] = 0.f; +                wght[3] = 0.f; +            }  			for (U32 k = 0; k < 4; k++)  			{ | 
