diff options
author | Debi King (Dessie) <dessie@lindenlab.com> | 2011-06-03 20:03:52 -0400 |
---|---|---|
committer | Debi King (Dessie) <dessie@lindenlab.com> | 2011-06-03 20:03:52 -0400 |
commit | db2d21a89b62acc14025e7c529721e994ca96a9f (patch) | |
tree | 5124aa04ff7a212c00891b517740afd050c724e5 /indra/llprimitive | |
parent | d5f96c38e6f5838672c87e540aaaa3b1663837f8 (diff) | |
parent | eef9016ca15631783e0d61b98da858a971b2ab72 (diff) |
reconciled .hgtags
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 794cdb83d5..57ac7a143f 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -991,6 +991,9 @@ void LLModel::normalizeVolumeFaces() scale.splat(1.f); scale.div(size); + LLVector4a inv_scale(1.f); + inv_scale.div(scale); + for (U32 i = 0; i < mVolumeFaces.size(); ++i) { LLVolumeFace& face = mVolumeFaces[i]; @@ -1007,10 +1010,14 @@ void LLModel::normalizeVolumeFaces() // For all the positions, we scale // the positions to fit within the unit cube. LLVector4a* pos = (LLVector4a*) face.mPositions; + LLVector4a* norm = (LLVector4a*) face.mNormals; + for (U32 j = 0; j < face.mNumVertices; ++j) { pos[j].add(trans); pos[j].mul(scale); + norm[j].mul(inv_scale); + norm[j].normalize3(); } } |