diff options
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 22 | ||||
-rw-r--r-- | linden/indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llviewercontrol.cpp | 14 | ||||
-rw-r--r-- | linden/indra/newview/llvovolume.cpp | 13 | ||||
-rw-r--r-- | linden/indra/newview/llvovolume.h | 3 |
5 files changed, 47 insertions, 7 deletions
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 @@ | |||
1097 | <key>Value</key> | 1097 | <key>Value</key> |
1098 | <integer>1</integer> | 1098 | <integer>1</integer> |
1099 | </map> | 1099 | </map> |
1100 | <key>RenderSculptSAMax</key> | ||
1101 | <map> | ||
1102 | <key>Comment</key> | ||
1103 | <string>The maximum combined surface area of sculpts(per frame) that are above the threshold before they stop being rendered</string> | ||
1104 | <key>Persist</key> | ||
1105 | <integer>1</integer> | ||
1106 | <key>Type</key> | ||
1107 | <string>F32</string> | ||
1108 | <key>Value</key> | ||
1109 | <integer>50000</integer> | ||
1110 | </map> | ||
1111 | <key>RenderSculptSAThreshold</key> | ||
1112 | <map> | ||
1113 | <key>Comment</key> | ||
1114 | <string>Surface area at which sculpts are considered for not being rendered</string> | ||
1115 | <key>Persist</key> | ||
1116 | <integer>1</integer> | ||
1117 | <key>Type</key> | ||
1118 | <string>F32</string> | ||
1119 | <key>Value</key> | ||
1120 | <integer>1750</integer> | ||
1121 | </map> | ||
1100 | <key>RenderWaterVoidCulling</key> | 1122 | <key>RenderWaterVoidCulling</key> |
1101 | <map> | 1123 | <map> |
1102 | <key>Comment</key> | 1124 | <key>Comment</key> |
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() | |||
422 | LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor"); | 422 | LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor"); |
423 | LLVOAvatar::sLODFactor = gSavedSettings.getF32("RenderAvatarLODFactor"); | 423 | LLVOAvatar::sLODFactor = gSavedSettings.getF32("RenderAvatarLODFactor"); |
424 | LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); | 424 | LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); |
425 | LLVOVolume::sSculptSAThresh = gSavedSettings.getF32("RenderSculptSAThreshold"); | ||
426 | LLVOVolume::sSculptSAMax = gSavedSettings.getF32("RenderSculptSAMax"); | ||
425 | LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible"); | 427 | LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible"); |
426 | // clamp auto-open time to some minimum usable value | 428 | // clamp auto-open time to some minimum usable value |
427 | LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay")); | 429 | 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) | |||
530 | return true; | 530 | return true; |
531 | } | 531 | } |
532 | 532 | ||
533 | bool handleRenderSculptSAThresholdChanged(const LLSD& newvalue) | ||
534 | { | ||
535 | LLVOVolume::sSculptSAThresh = newvalue.asReal(); | ||
536 | return true; | ||
537 | } | ||
538 | |||
539 | bool handleRenderSculptSAMaxChanged(const LLSD& newvalue) | ||
540 | { | ||
541 | LLVOVolume::sSculptSAMax = newvalue.asReal(); | ||
542 | return true; | ||
543 | } | ||
544 | |||
533 | 545 | ||
534 | //////////////////////////////////////////////////////////////////////////// | 546 | //////////////////////////////////////////////////////////////////////////// |
535 | 547 | ||
@@ -676,6 +688,8 @@ void settings_setup_listeners() | |||
676 | gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); | 688 | gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); |
677 | gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1)); | 689 | gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1)); |
678 | gSavedSettings.getControl("TranslateChat")->getSignal()->connect(boost::bind(&handleTranslateChatPrefsChanged, _1)); | 690 | gSavedSettings.getControl("TranslateChat")->getSignal()->connect(boost::bind(&handleTranslateChatPrefsChanged, _1)); |
691 | gSavedSettings.getControl("RenderSculptSAThreshold")->getSignal()->connect(boost::bind(&handleRenderSculptSAThresholdChanged, _1)); | ||
692 | gSavedSettings.getControl("RenderSculptSAMax")->getSignal()->connect(boost::bind(&handleRenderSculptSAMaxChanged, _1)); | ||
679 | } | 693 | } |
680 | 694 | ||
681 | template <> eControlType get_control_type<U32>(const U32& in, LLSD& out) | 695 | template <> eControlType get_control_type<U32>(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 @@ | |||
71 | const S32 MIN_QUIET_FRAMES_COALESCE = 30; | 71 | const S32 MIN_QUIET_FRAMES_COALESCE = 30; |
72 | const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; | 72 | const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; |
73 | const F32 FORCE_CULL_AREA = 8.f; | 73 | const F32 FORCE_CULL_AREA = 8.f; |
74 | |||
75 | static const F32 sSculptSAThresh = 1750.f; // Surface area at which sculpts are considered for not being rendered | ||
76 | static const F32 sSculptSAMax = 50000.f; // The maximum combined surface area of sculpts(per frame) that are above the | ||
77 | // threshold before they stop being rendered | ||
78 | 74 | ||
79 | BOOL gAnimateTextures = TRUE; | 75 | BOOL gAnimateTextures = TRUE; |
80 | extern BOOL gHideSelectedObjects; | 76 | extern BOOL gHideSelectedObjects; |
@@ -83,6 +79,9 @@ F32 LLVOVolume::sLODFactor = 1.f; | |||
83 | F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop | 79 | F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop |
84 | F32 LLVOVolume::sDistanceFactor = 1.0f; | 80 | F32 LLVOVolume::sDistanceFactor = 1.0f; |
85 | S32 LLVOVolume::sNumLODChanges = 0; | 81 | S32 LLVOVolume::sNumLODChanges = 0; |
82 | F32 LLVOVolume::sSculptSAThresh = 1750.f; | ||
83 | F32 LLVOVolume::sSculptSAMax = 50000.f; | ||
84 | |||
86 | 85 | ||
87 | LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) | 86 | LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) |
88 | : LLViewerObject(id, pcode, regionp), | 87 | : LLViewerObject(id, pcode, regionp), |
@@ -2310,14 +2309,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) | |||
2310 | 2309 | ||
2311 | llassert_always(vobj); | 2310 | llassert_always(vobj); |
2312 | 2311 | ||
2313 | if (vobj->isSculpted() && vobj->mSculptSurfaceArea > sSculptSAThresh) | 2312 | if (vobj->isSculpted() && vobj->mSculptSurfaceArea > LLVOVolume::sSculptSAThresh) |
2314 | { | 2313 | { |
2315 | LLPipeline::sSculptSurfaceAreaFrame += vobj->mSculptSurfaceArea; | 2314 | LLPipeline::sSculptSurfaceAreaFrame += vobj->mSculptSurfaceArea; |
2316 | if (LLPipeline::sSculptSurfaceAreaFrame > sSculptSAMax) | 2315 | if (LLPipeline::sSculptSurfaceAreaFrame > LLVOVolume::sSculptSAMax) |
2317 | { | 2316 | { |
2318 | LL_DEBUGS("Volume") << "Sculptie (" | 2317 | LL_DEBUGS("Volume") << "Sculptie (" |
2319 | << vobj->getID() << ") above RenderSculptSAMax (" | 2318 | << vobj->getID() << ") above RenderSculptSAMax (" |
2320 | << sSculptSAMax | 2319 | << LLVOVolume::sSculptSAMax |
2321 | << ")! Turning invisible!" | 2320 | << ")! Turning invisible!" |
2322 | << LL_ENDL; | 2321 | << LL_ENDL; |
2323 | continue; | 2322 | 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: | |||
247 | static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop | 247 | static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop |
248 | static F32 sLODFactor; // LOD scale factor | 248 | static F32 sLODFactor; // LOD scale factor |
249 | static F32 sDistanceFactor; // LOD distance factor | 249 | static F32 sDistanceFactor; // LOD distance factor |
250 | static F32 sSculptSAThresh; // Surface area at which sculpts are considered for not being rendered | ||
251 | static F32 sSculptSAMax; // The maximum combined surface area of sculpts(per frame) that are above the | ||
252 | // threshold before they stop being rendered | ||
250 | 253 | ||
251 | protected: | 254 | protected: |
252 | static S32 sNumLODChanges; | 255 | static S32 sNumLODChanges; |