summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-06-10 16:57:31 -0500
committerGitHub <noreply@github.com>2024-06-10 16:57:31 -0500
commit4522f33d2bad2cc0f67e10a0b0ad3cc7c1b43fbd (patch)
treef2e020507f3240208e8d0b105f7e100a1e7aaf36 /indra/llmath
parent4705362a332a2347510c81c8d00a1f607ad88af8 (diff)
#1677 Add GLTF extensions serialization and support for KHR_materials_unlit (#1686)
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llvolumeoctree.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/llmath/llvolumeoctree.cpp b/indra/llmath/llvolumeoctree.cpp
index 7a4d313fb1..faa169e295 100644
--- a/indra/llmath/llvolumeoctree.cpp
+++ b/indra/llmath/llvolumeoctree.cpp
@@ -151,7 +151,7 @@ void LLOctreeTriangleRayIntersect::visit(const LLOctreeNode<LLVolumeTriangle, LL
U32 idx1 = tri->mIndex[1];
U32 idx2 = tri->mIndex[2];
- if (mTexCoord != NULL)
+ if (mTexCoord != NULL && mFace->mTexCoords)
{
LLVector2* tc = (LLVector2*) mFace->mTexCoords;
*mTexCoord = ((1.f - a - b) * tc[idx0] +
@@ -160,7 +160,7 @@ void LLOctreeTriangleRayIntersect::visit(const LLOctreeNode<LLVolumeTriangle, LL
}
- if (mNormal != NULL)
+ if (mNormal != NULL && mFace->mNormals)
{
LLVector4a* norm = mFace->mNormals;
@@ -180,7 +180,7 @@ void LLOctreeTriangleRayIntersect::visit(const LLOctreeNode<LLVolumeTriangle, LL
*mNormal = n1;
}
- if (mTangent != NULL)
+ if (mTangent != NULL && mFace->mTangents)
{
LLVector4a* tangents = mFace->mTangents;