From 14f4622c3b836caafea64a260a00a5f5a9f103f9 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 8 Jul 2011 14:48:05 -0700 Subject: Added debug settings RenderSculptSAThreshold and RenderSculptSAMax. Adjust these if sculpties ever go invisible that shouldn't --- linden/indra/newview/app_settings/settings.xml | 22 ++++++++++++++++++++++ linden/indra/newview/llappviewer.cpp | 2 ++ linden/indra/newview/llviewercontrol.cpp | 14 ++++++++++++++ linden/indra/newview/llvovolume.cpp | 13 ++++++------- linden/indra/newview/llvovolume.h | 3 +++ 5 files changed, 47 insertions(+), 7 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 74750a6..e03e1f3 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -1097,6 +1097,28 @@ Value 1 + RenderSculptSAMax + + Comment + The maximum combined surface area of sculpts(per frame) that are above the threshold before they stop being rendered + Persist + 1 + Type + F32 + Value + 50000 + + RenderSculptSAThreshold + + Comment + Surface area at which sculpts are considered for not being rendered + Persist + 1 + Type + F32 + Value + 1750 + RenderWaterVoidCulling Comment diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index b96f6c2..519fa62 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -422,6 +422,8 @@ static void settings_to_globals() LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor"); LLVOAvatar::sLODFactor = gSavedSettings.getF32("RenderAvatarLODFactor"); LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); + LLVOVolume::sSculptSAThresh = gSavedSettings.getF32("RenderSculptSAThreshold"); + LLVOVolume::sSculptSAMax = gSavedSettings.getF32("RenderSculptSAMax"); LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible"); // clamp auto-open time to some minimum usable value LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay")); diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index 0a23045..4c81e71 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp @@ -530,6 +530,18 @@ bool handleSliderScrollWheelMultiplierChanged(const LLSD& newvalue) return true; } +bool handleRenderSculptSAThresholdChanged(const LLSD& newvalue) +{ + LLVOVolume::sSculptSAThresh = newvalue.asReal(); + return true; +} + +bool handleRenderSculptSAMaxChanged(const LLSD& newvalue) +{ + LLVOVolume::sSculptSAMax = newvalue.asReal(); + return true; +} + //////////////////////////////////////////////////////////////////////////// @@ -676,6 +688,8 @@ void settings_setup_listeners() gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1)); gSavedSettings.getControl("TranslateChat")->getSignal()->connect(boost::bind(&handleTranslateChatPrefsChanged, _1)); + gSavedSettings.getControl("RenderSculptSAThreshold")->getSignal()->connect(boost::bind(&handleRenderSculptSAThresholdChanged, _1)); + gSavedSettings.getControl("RenderSculptSAMax")->getSignal()->connect(boost::bind(&handleRenderSculptSAMaxChanged, _1)); } template <> eControlType get_control_type(const U32& in, LLSD& out) diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 77201da..d40ee99 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -71,10 +71,6 @@ const S32 MIN_QUIET_FRAMES_COALESCE = 30; const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; - -static const F32 sSculptSAThresh = 1750.f; // Surface area at which sculpts are considered for not being rendered -static const F32 sSculptSAMax = 50000.f; // The maximum combined surface area of sculpts(per frame) that are above the - // threshold before they stop being rendered BOOL gAnimateTextures = TRUE; extern BOOL gHideSelectedObjects; @@ -83,6 +79,9 @@ F32 LLVOVolume::sLODFactor = 1.f; F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop F32 LLVOVolume::sDistanceFactor = 1.0f; S32 LLVOVolume::sNumLODChanges = 0; +F32 LLVOVolume::sSculptSAThresh = 1750.f; +F32 LLVOVolume::sSculptSAMax = 50000.f; + LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) : LLViewerObject(id, pcode, regionp), @@ -2310,14 +2309,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) llassert_always(vobj); - if (vobj->isSculpted() && vobj->mSculptSurfaceArea > sSculptSAThresh) + if (vobj->isSculpted() && vobj->mSculptSurfaceArea > LLVOVolume::sSculptSAThresh) { LLPipeline::sSculptSurfaceAreaFrame += vobj->mSculptSurfaceArea; - if (LLPipeline::sSculptSurfaceAreaFrame > sSculptSAMax) + if (LLPipeline::sSculptSurfaceAreaFrame > LLVOVolume::sSculptSAMax) { LL_DEBUGS("Volume") << "Sculptie (" << vobj->getID() << ") above RenderSculptSAMax (" - << sSculptSAMax + << LLVOVolume::sSculptSAMax << ")! Turning invisible!" << LL_ENDL; continue; diff --git a/linden/indra/newview/llvovolume.h b/linden/indra/newview/llvovolume.h index 2da1d7a..25f5d95 100644 --- a/linden/indra/newview/llvovolume.h +++ b/linden/indra/newview/llvovolume.h @@ -247,6 +247,9 @@ public: static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop static F32 sLODFactor; // LOD scale factor static F32 sDistanceFactor; // LOD distance factor + static F32 sSculptSAThresh; // Surface area at which sculpts are considered for not being rendered + static F32 sSculptSAMax; // The maximum combined surface area of sculpts(per frame) that are above the + // threshold before they stop being rendered protected: static S32 sNumLODChanges; -- cgit v1.1