summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 33d6a205e7..3f69815e38 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -2177,6 +2177,11 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
mask.setElement<3>();
LLVector4a* tbuff = mikktspace ? vf.mMikktSpaceTangents : vf.mTangents;
+ if (tbuff == nullptr)
+ { // non-mesh prims will not have mikktspace tangents
+ tbuff = vf.mTangents;
+ }
+
LLVector4a* src = tbuff;
LLVector4a* end = tbuff+num_vertices;
@@ -2184,7 +2189,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{
LLVector4a tangent_out;
mat_normal.rotate(*src, tangent_out);
- tangent_out.normalize3fast();
tangent_out.setSelectWithMask(mask, *src, tangent_out);
tangent_out.store4a(tangents);