summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-09-09 20:56:22 -0500
committerDave Parks <davep@lindenlab.com>2022-09-09 20:56:22 -0500
commitc822da9fe644e4a420caabb30a25b487ce75c099 (patch)
tree7d06f66a46c62dc5bbcf6cccbab8acfca552fdab /indra/newview/llface.cpp
parentdfe19c257dbb9d5af6f1e2961015e95847525412 (diff)
SL-18095 WIP -- Allow mikktspace generator to add more vertices (skip re-welding step for now).
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index f35b4b6d91..83d35b7f3c 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,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{
LLVector4a tangent_out;
mat_normal.rotate(*src, tangent_out);
- tangent_out.normalize3fast();
+ tangent_out.normalize3();
tangent_out.setSelectWithMask(mask, *src, tangent_out);
tangent_out.store4a(tangents);