From 3a519a998c4d3ebd3cfcbe632a67b6c37c45860f Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 4 Oct 2009 22:44:41 -0700 Subject: Changes that should improve sculpty LOD --- ChangeLog.txt | 5 +++++ linden/indra/llmath/llvolume.cpp | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 91be994..2d3d49b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,10 @@ 2009-10-04 McCabe Maxsted + * Changes that should improve sculpty LOD. + + modified: linden/indra/llmath/llvolume.cpp + + * Fixed mini-map distance label and rounding. modified: linden/indra/newview/llfloatermap.cpp diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 5603a9c..9aa02ee 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -2198,10 +2198,16 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, S32 requested_sizeS = 0; S32 requested_sizeT = 0; - sculpt_calc_mesh_resolution(sculpt_width, sculpt_height, sculpt_type, mDetail, requested_sizeS, requested_sizeT); + // create oblong sculpties with high LOD always + F32 sculpt_detail = mDetail; + if (sculpt_width != sculpt_height && sculpt_detail < 4.0) + { + sculpt_detail = 4.0; + } + sculpt_calc_mesh_resolution(sculpt_width, sculpt_height, sculpt_type, sculpt_detail, requested_sizeS, requested_sizeT); - mPathp->generate(mParams.getPathParams(), mDetail, 0, TRUE, requested_sizeS); - mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(), mDetail, 0, TRUE, requested_sizeT); + mPathp->generate(mParams.getPathParams(), sculpt_detail, 0, TRUE, requested_sizeS); + mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(), sculpt_detail, 0, TRUE, requested_sizeT); S32 sizeS = mPathp->mPath.size(); // we requested a specific size, now see what we really got S32 sizeT = mProfilep->mProfile.size(); // we requested a specific size, now see what we really got -- cgit v1.1