From 5a80be37fd172299c64c1ae2a902419190ad758e Mon Sep 17 00:00:00 2001 From: November Date: Thu, 14 Oct 2010 16:18:19 -0700 Subject: [PATCH] Should fix issues rezzing oblong sculpties. --- indra/newview/llface.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 3d93dd4d2..392ad9fa8 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1269,10 +1269,18 @@ F32 LLFace::getTextureVirtualSize() } F32 face_area; - if (mVObjp->isSculpted() && texel_area > 1.f) + if (mVObjp->isSculpted()) { //sculpts can break assumptions about texel area - face_area = mPixelArea; + if (texel_area > 1.f) + { + face_area = mPixelArea; + } + else + { + face_area = mPixelArea / llclamp(texel_area, 0.015625f, 128.f); + } + } else {