From bc7dc2f94985658595093d4619b4a0ad25f2ff37 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 6 Apr 2022 12:57:07 -0500 Subject: SL-17160 Ignore "getIsAlphaMask" on rigged faces. --- indra/newview/llface.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index b328dd2962..b4f4d52014 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1172,6 +1172,11 @@ bool LLFace::canRenderAsMask() return true; } + if (isState(LLFace::RIGGED)) + { // never auto alpha-mask rigged faces + return false; + } + const LLTextureEntry* te = getTextureEntry(); if( !te || !getViewerObject() || !getTexture() ) { -- cgit v1.2.3 From bafa869c21cb8b329f94be6fa930a43d11699082 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 25 Apr 2022 15:58:07 -0500 Subject: SL-17239 Override face bounding box with avatar bounding box for rigged meshes when calculating virtual size. --- indra/newview/llface.cpp | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index b4f4d52014..d1e2b8b93d 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2364,14 +2364,35 @@ F32 LLFace::getTextureVirtualSize() BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) { - LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE + LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE; //VECTORIZE THIS //get area of circle around face - LLVector4a center; - center.load3(getPositionAgent().mV); - LLVector4a size; - size.setSub(mExtents[1], mExtents[0]); + + LLVector4a center; + LLVector4a size; + + + if (isState(LLFace::RIGGED)) + { + //override with avatar bounding box + LLVOAvatar* avatar = mVObjp->getAvatar(); + if (avatar) + { + center.load3(avatar->getPositionAgent().mV); + const LLVector4a* exts = avatar->mDrawable->getSpatialExtents(); + size.setSub(exts[1], exts[0]); + } + else + { + return false; + } + } + else + { + center.load3(getPositionAgent().mV); + size.setSub(mExtents[1], mExtents[0]); + } size.mul(0.5f); LLViewerCamera* camera = LLViewerCamera::getInstance(); -- cgit v1.2.3