diff options
author | Dave Parks <davep@lindenlab.com> | 2024-09-18 15:23:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-18 15:23:20 -0500 |
commit | b31fd167c00a288656ea82d239a9ce379f382c22 (patch) | |
tree | ef54afc9cc27cd243cc46df0ca11668a56ce3ce6 /indra/newview/llface.cpp | |
parent | 4640f3204d87ebde9f12ea9c6c13beb6d77cdca2 (diff) |
Fix for particles not loading textures (#2598)
Also fix assert while prepping GLTF assets
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r-- | indra/newview/llface.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index ce68474211..297661effd 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2268,6 +2268,14 @@ bool LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) center.mul(0.5f); size.setSub(mRiggedExtents[1], mRiggedExtents[0]); } + else if (mDrawablep && mVObjp.notNull() && mVObjp->getPartitionType() == LLViewerRegion::PARTITION_PARTICLE && mDrawablep->getSpatialGroup()) + { // use box of spatial group for particles (over approximates size, but we don't actually have a good size per particle) + LLSpatialGroup* group = mDrawablep->getSpatialGroup(); + const LLVector4a* extents = group->getExtents(); + size.setSub(extents[1], extents[0]); + center.setAdd(extents[1], extents[0]); + center.mul(0.5f); + } else { center.load3(getPositionAgent().mV); |