From 1ff67ec5124b5b08e1e0d050d06773c9d3c889fc Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 8 Nov 2016 01:28:17 +0200 Subject: MAINT-6914 Increase maximum UI size value to 4.0 --- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/skins/default/xui/en/panel_preferences_advanced.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 4f4b33fa8c..9e68bb78e0 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -253,7 +253,7 @@ BOOL gQuietSnapshot = FALSE; // Minimum value for UIScaleFactor, also defined in preferences, ui_scale_slider static const F32 MIN_UI_SCALE = 0.75f; -// 2.0 in preferences, but win10 supports larger scaling and value is used more as +// 4.0 in preferences, but win10 supports larger scaling and value is used more as // sanity check, so leaving space for larger values from DPI updates. static const F32 MAX_UI_SCALE = 7.0f; static const F32 MIN_DISPLAY_SCALE = 0.75f; diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 4a5117adac..0deb1d03cf 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -138,7 +138,7 @@ initial_value="1" layout="topleft" left_pad="0" - max_val="2.0" + max_val="4.0" min_val="0.75" name="ui_scale_slider" top_pad="-14" -- cgit v1.2.3 From 0e6e04317bb896331b984e624c48e702986f2def Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 8 Nov 2016 04:44:46 +0200 Subject: Backed out changeset: 27782e83386b Reverting MAINT-6793 --- indra/newview/app_settings/settings.xml | 6 +++--- indra/newview/llappviewer.cpp | 2 +- indra/newview/llviewercontrol.cpp | 4 ++-- indra/newview/llvovolume.cpp | 38 +++++---------------------------- indra/newview/llvovolume.h | 2 +- 5 files changed, 12 insertions(+), 40 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 017b2a5249..28c632b498 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10273,16 +10273,16 @@ Value 1.0 - RenderRiggedLodCompensation + RenderRiggedFactorMultiplier Comment - Affects visibility range of worn rigged meshes to compensate for missing LODs (limited by avatars own visibility) + Affects level of detail for worn rigged meshes Persist 1 Type F32 Value - 6.5 + 7.5 RenderWater diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bf7e643d0b..b0829a3da1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -592,7 +592,7 @@ static void settings_to_globals() LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor"); - LLVOVolume::sRiggedLODCompensation = llmax(0.25f, gSavedSettings.getF32("RenderRiggedLodCompensation")); + LLVOVolume::sRiggedFactorMultiplier = gSavedSettings.getF32("RenderRiggedFactorMultiplier"); LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f; LLVolumeImplFlexible::sUpdateFactor = gSavedSettings.getF32("RenderFlexTimeFactor"); LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor"); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index bdd79b0da1..5e74e9f019 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -209,7 +209,7 @@ static bool handleVolumeLODChanged(const LLSD& newvalue) static bool handleRiggedLODChanged(const LLSD& newvalue) { - LLVOVolume::sRiggedLODCompensation = llmax(0.25f, (F32)newvalue.asReal()); + LLVOVolume::sRiggedFactorMultiplier = (F32)newvalue.asReal(); return true; } @@ -625,7 +625,7 @@ void settings_setup_listeners() gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _2)); - gSavedSettings.getControl("RenderRiggedLodCompensation")->getSignal()->connect(boost::bind(&handleRiggedLODChanged, _2)); + gSavedSettings.getControl("RenderRiggedFactorMultiplier")->getSignal()->connect(boost::bind(&handleRiggedLODChanged, _2)); gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _2)); gSavedSettings.getControl("RenderAvatarPhysicsLODFactor")->getSignal()->connect(boost::bind(&handleAvatarPhysicsLODChanged, _2)); gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _2)); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 8d86623665..55739915a3 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -80,14 +80,13 @@ const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; -static const F32 MINIMUM_RIGGED_RADIUS = 0.05f; U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 20; BOOL gAnimateTextures = TRUE; //extern BOOL gHideSelectedObjects; F32 LLVOVolume::sLODFactor = 1.f; -F32 LLVOVolume::sRiggedLODCompensation = 6.5f; +F32 LLVOVolume::sRiggedFactorMultiplier = 6.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; @@ -1255,39 +1254,12 @@ BOOL LLVOVolume::calcLOD() } // Note: when changing, take note that a lot of rigged meshes have only one LOD. + lod_factor *= LLVOVolume::sRiggedFactorMultiplier; distance = avatar->mDrawable->mDistanceWRTCamera; F32 avatar_radius = avatar->getBinRadius(); - F32 object_radius = 0; - - LLDrawable* drawablep = mDrawable.get(); - while (!drawablep->isRoot()) - { - drawablep = drawablep->getParent(); - } - - // Mesh can consist of multiple objects that have to be treated as one item or we will - // get strange deformations or partially missing meshes (smallest elements will disappear) - LLSpatialBridge* bridge = drawablep->getSpatialBridge(); - if (bridge) - { - const LLVector4a* ext = bridge->getSpatialExtents(); - LLVector4a diff; - diff.setSub(ext[1], ext[0]); - object_radius = diff.getLength3().getF32(); - } - - if (object_radius <= 0) - { - // bridge missing or somehow not updated - const LLVector4a* ext = mDrawable->getSpatialExtents(); - LLVector4a diff; - diff.setSub(ext[1], ext[0]); - object_radius = diff.getLength3().getF32(); - } - - // sRiggedLODCompensation is made to compensate for missing lower lods - radius = object_radius * LLVOVolume::sRiggedLODCompensation; - radius = llclamp(radius, MINIMUM_RIGGED_RADIUS, avatar_radius); + F32 object_radius = getVolume() ? getVolume()->mLODScaleBias.scaledVec(getScale()).length() : getScale().length(); + radius = object_radius * LLVOVolume::sRiggedFactorMultiplier; + radius = llmin(radius, avatar_radius); } else { diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index ff005f8dc5..ca9917069b 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -379,7 +379,7 @@ private: public: static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop static F32 sLODFactor; // LOD scale factor - static F32 sRiggedLODCompensation; // HACK: worn rigged LODs often have only high lod, so we are bumping them up withing avatar's visibility + static F32 sRiggedFactorMultiplier; // Worn rigged LOD scale factor multiplier static F32 sDistanceFactor; // LOD distance factor static LLPointer sObjectMediaClient; -- cgit v1.2.3 From c24b95e483549870a69062510f0abc9eded97a36 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 8 Nov 2016 04:45:47 +0200 Subject: Backed out changeset: 2a56972b1571 Reverting MAINT-6259 --- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llappviewer.cpp | 1 - indra/newview/llviewercontrol.cpp | 7 ------- indra/newview/llvovolume.cpp | 26 +++++++++----------------- indra/newview/llvovolume.h | 3 +-- 5 files changed, 10 insertions(+), 38 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 28c632b498..5cf2e4555d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10273,17 +10273,6 @@ Value 1.0 - RenderRiggedFactorMultiplier - - Comment - Affects level of detail for worn rigged meshes - Persist - 1 - Type - F32 - Value - 7.5 - RenderWater Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b0829a3da1..9db03a7438 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -592,7 +592,6 @@ static void settings_to_globals() LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor"); - LLVOVolume::sRiggedFactorMultiplier = gSavedSettings.getF32("RenderRiggedFactorMultiplier"); LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f; LLVolumeImplFlexible::sUpdateFactor = gSavedSettings.getF32("RenderFlexTimeFactor"); LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor"); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 5e74e9f019..16f40fb747 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -207,12 +207,6 @@ static bool handleVolumeLODChanged(const LLSD& newvalue) return true; } -static bool handleRiggedLODChanged(const LLSD& newvalue) -{ - LLVOVolume::sRiggedFactorMultiplier = (F32)newvalue.asReal(); - return true; -} - static bool handleAvatarLODChanged(const LLSD& newvalue) { LLVOAvatar::sLODFactor = (F32) newvalue.asReal(); @@ -625,7 +619,6 @@ void settings_setup_listeners() gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _2)); - gSavedSettings.getControl("RenderRiggedFactorMultiplier")->getSignal()->connect(boost::bind(&handleRiggedLODChanged, _2)); gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _2)); gSavedSettings.getControl("RenderAvatarPhysicsLODFactor")->getSignal()->connect(boost::bind(&handleAvatarPhysicsLODChanged, _2)); gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _2)); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 55739915a3..da1587d494 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -86,7 +86,6 @@ BOOL gAnimateTextures = TRUE; //extern BOOL gHideSelectedObjects; F32 LLVOVolume::sLODFactor = 1.f; -F32 LLVOVolume::sRiggedFactorMultiplier = 6.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; @@ -1214,18 +1213,18 @@ void LLVOVolume::sculpt() } } -S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius, F32 lod_factor) +S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius) { S32 cur_detail; if (LLPipeline::sDynamicLOD) { // We've got LOD in the profile, and in the twist. Use radius. - F32 tan_angle = (lod_factor*radius) / distance; + F32 tan_angle = (LLVOVolume::sLODFactor*radius)/distance; cur_detail = LLVolumeLODGroup::getDetailFromTan(ll_round(tan_angle, 0.01f)); } else { - cur_detail = llclamp((S32)(sqrtf(radius)*lod_factor*4.f), 0, 3); + cur_detail = llclamp((S32) (sqrtf(radius)*LLVOVolume::sLODFactor*4.f), 0, 3); } return cur_detail; } @@ -1241,7 +1240,6 @@ BOOL LLVOVolume::calcLOD() F32 radius; F32 distance; - F32 lod_factor = LLVOVolume::sLODFactor; if (mDrawable->isState(LLDrawable::RIGGED)) { @@ -1253,27 +1251,22 @@ BOOL LLVOVolume::calcLOD() return FALSE; } - // Note: when changing, take note that a lot of rigged meshes have only one LOD. - lod_factor *= LLVOVolume::sRiggedFactorMultiplier; distance = avatar->mDrawable->mDistanceWRTCamera; - F32 avatar_radius = avatar->getBinRadius(); - F32 object_radius = getVolume() ? getVolume()->mLODScaleBias.scaledVec(getScale()).length() : getScale().length(); - radius = object_radius * LLVOVolume::sRiggedFactorMultiplier; - radius = llmin(radius, avatar_radius); + radius = avatar->getBinRadius(); } else { distance = mDrawable->mDistanceWRTCamera; radius = getVolume() ? getVolume()->mLODScaleBias.scaledVec(getScale()).length() : getScale().length(); } - + //hold onto unmodified distance for debugging //F32 debug_distance = distance; - + distance *= sDistanceFactor; - F32 rampDist = lod_factor * 2; - + F32 rampDist = LLVOVolume::sLODFactor * 2; + if (distance < rampDist) { // Boost LOD when you're REALLY close @@ -1286,8 +1279,7 @@ BOOL LLVOVolume::calcLOD() distance *= F_PI/3.f; cur_detail = computeLODDetail(ll_round(distance, 0.01f), - ll_round(radius, 0.01f), - lod_factor); + ll_round(radius, 0.01f)); if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO) && diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index ca9917069b..a331908320 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -327,7 +327,7 @@ public: void clearRiggedVolume(); protected: - S32 computeLODDetail(F32 distance, F32 radius, F32 lod_factor); + S32 computeLODDetail(F32 distance, F32 radius); BOOL calcLOD(); LLFace* addFace(S32 face_index); void updateTEData(); @@ -379,7 +379,6 @@ private: public: static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop static F32 sLODFactor; // LOD scale factor - static F32 sRiggedFactorMultiplier; // Worn rigged LOD scale factor multiplier static F32 sDistanceFactor; // LOD distance factor static LLPointer sObjectMediaClient; -- cgit v1.2.3 From 7b356a0011eab4fc282c35da4b25c66ed164663f Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 8 Nov 2016 03:26:25 +0200 Subject: Backed out changeset: fb2eb1a59be6 Reverting MAINT-6125 --- indra/newview/llvieweroctree.cpp | 2 +- indra/newview/llvovolume.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 86591ff4df..023f1b92ba 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -465,7 +465,7 @@ LLViewerOctreeGroup::LLViewerOctreeGroup(OctreeNode* node) { LLVector4a tmp; tmp.splat(0.f); - mExtents[0] = mExtents[1] = mObjectBounds[0] = mObjectBounds[1] = + mExtents[0] = mExtents[1] = mObjectBounds[0] = mObjectBounds[0] = mObjectBounds[1] = mObjectExtents[0] = mObjectExtents[1] = tmp; mBounds[0] = node->getCenter(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index da1587d494..8c026bae21 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1753,10 +1753,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) dirtySpatialGroup(drawable->isState(LLDrawable::IN_REBUILD_Q1)); compiled = TRUE; lodOrSculptChanged(drawable, compiled); - if (!mLODChanged) - { - genBBoxes(FALSE); - } + genBBoxes(FALSE); } // it has its own drawable (it's moved) or it has changed UVs or it has changed xforms from global<->local else -- cgit v1.2.3