From b89af09f598af21b67b14e5ff940461d9c89afb8 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 4 Mar 2011 14:25:46 -0600 Subject: SH-998 Fix for improper LoD when an object is first rezzed. --- indra/newview/lldrawable.cpp | 9 ++++++++- indra/newview/llviewermenu.cpp | 4 ++++ indra/newview/llvovolume.cpp | 11 ++++++++++- indra/newview/pipeline.cpp | 2 +- indra/newview/pipeline.h | 1 + indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ++++++++++ 6 files changed, 34 insertions(+), 3 deletions(-) diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index fe743e7451..bdc12ec0e3 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -708,7 +708,14 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) LLVOVolume* volume = getVOVolume(); if (volume) { - pos.set(getPositionGroup().getF32ptr()); + if (getSpatialGroup()) + { + pos.set(getPositionGroup().getF32ptr()); + } + else + { + pos = getPositionAgent(); + } if (isState(LLDrawable::HAS_ALPHA)) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 37aa080228..99c7d4b8c9 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -937,6 +937,10 @@ U32 info_display_from_string(std::string info_display) { return LLPipeline::RENDER_DEBUG_FACE_AREA; } + else if ("lod info" == info_display) + { + return LLPipeline::RENDER_DEBUG_LOD_INFO; + } else if ("build queue" == info_display) { return LLPipeline::RENDER_DEBUG_BUILD_QUEUE; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 66263412ec..7601b68c5f 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1218,7 +1218,10 @@ BOOL LLVOVolume::calcLOD() distance = mDrawable->mDistanceWRTCamera; radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length(); } - + + //hold onto unmodified distance for debugging + F32 debug_distance = distance; + distance *= sDistanceFactor; F32 rampDist = LLVOVolume::sLODFactor * 2; @@ -1237,6 +1240,12 @@ BOOL LLVOVolume::calcLOD() cur_detail = computeLODDetail(llround(distance, 0.01f), llround(radius, 0.01f)); + + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO)) + { + setDebugText(llformat("%.2f:%.2f, %d", debug_distance, radius, cur_detail)); + } + if (cur_detail != mLOD) { mAppAngle = llround((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 9eaf515c65..ba597d62bf 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2742,7 +2742,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD) { - if (drawablep->isVisible()) + //if (drawablep->isVisible()) isVisible() check here is redundant, if it wasn't visible, it wouldn't be here { if (!drawablep->isActive()) { diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 32ac93388d..be58af947c 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -447,6 +447,7 @@ public: RENDER_DEBUG_UPDATE_TYPE = 0x0800000, RENDER_DEBUG_PHYSICS_SHAPES = 0x1000000, RENDER_DEBUG_NORMALS = 0x2000000, + RENDER_DEBUG_LOD_INFO = 0x4000000, }; public: diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0a6be2899b..38e9165613 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2277,6 +2277,16 @@ function="Advanced.ToggleInfoDisplay" parameter="face area" /> + + + + -- cgit v1.2.3 From 8ca521070212bab3018fd22ac4eb30e09503fa3f Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 4 Mar 2011 14:35:22 -0600 Subject: Get rid of "start" "stop" spam from DoF focal point transition. --- indra/newview/pipeline.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ba597d62bf..c1d1a69dfb 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6219,17 +6219,12 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) if (transition_time >= 1.f && fabsf(current_distance-target_distance)/current_distance > 0.01f) { //large shift happened, interpolate smoothly to new target distance - llinfos << "start" << llendl; transition_time = 0.f; start_distance = current_distance; } else if (transition_time < 1.f) { //currently in a transition, continue interpolating transition_time += 1.f/gSavedSettings.getF32("CameraFocusTransitionTime")*gFrameIntervalSeconds; - if (transition_time >= 1.f) - { - llinfos << "stop" << llendl; - } transition_time = llmin(transition_time, 1.f); F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f; -- cgit v1.2.3 From f6c7fdf6f274cfaafd7a3304c70b06d7b752aec9 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 4 Mar 2011 14:45:13 -0600 Subject: SH-971 Fix for local lights flag not getting set properly on xp and linux when adjusting graphics quality setting. --- indra/newview/featuretable_linux.txt | 7 ++++++- indra/newview/featuretable_xp.txt | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index a1ebbda623..c7ad0df50b 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -1,4 +1,4 @@ -version 22 +version 23 // NOTE: This is mostly identical to featuretable_mac.txt with a few differences // Should be combined into one table @@ -36,6 +36,7 @@ RenderFogRatio 1 4.0 RenderGamma 1 0 RenderGlowResolutionPow 1 9 RenderGround 1 1 +RenderLocalLights 1 1 RenderMaxPartCount 1 8192 RenderNightBrightness 1 1.0 RenderObjectBump 1 1 @@ -74,6 +75,7 @@ RenderAvatarVP 1 0 RenderFarClip 1 64 RenderFlexTimeFactor 1 0 RenderGlowResolutionPow 1 8 +RenderLocalLights 1 0 RenderMaxPartCount 1 0 RenderObjectBump 1 0 RenderReflectionDetail 1 0 @@ -102,6 +104,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 8 +RenderLocalLights 1 1 RenderMaxPartCount 1 2048 RenderObjectBump 1 1 RenderReflectionDetail 1 0 @@ -129,6 +132,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 +RenderLocalLights 1 1 RenderMaxPartCount 1 4096 RenderObjectBump 1 1 RenderReflectionDetail 1 0 @@ -156,6 +160,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 +RenderLocalLights 1 1 RenderMaxPartCount 1 8192 RenderObjectBump 1 1 RenderReflectionDetail 1 4 diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index d87c3db111..84da74840f 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -36,6 +36,7 @@ RenderFogRatio 1 4.0 RenderGamma 1 0 RenderGlowResolutionPow 1 9 RenderGround 1 1 +RenderLocalLights 1 1 RenderMaxPartCount 1 8192 RenderNightBrightness 1 1.0 RenderObjectBump 1 1 @@ -75,6 +76,7 @@ RenderAvatarVP 1 0 RenderFarClip 1 64 RenderFlexTimeFactor 1 0 RenderGlowResolutionPow 1 8 +RenderLocalLights 1 0 RenderMaxPartCount 1 0 RenderObjectBump 1 0 RenderReflectionDetail 1 0 @@ -103,6 +105,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 8 +RenderLocalLights 1 1 RenderMaxPartCount 1 2048 RenderObjectBump 1 1 RenderReflectionDetail 1 0 @@ -130,6 +133,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 +RenderLocalLights 1 1 RenderMaxPartCount 1 4096 RenderObjectBump 1 1 RenderReflectionDetail 1 0 @@ -157,6 +161,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 +RenderLocalLights 1 1 RenderMaxPartCount 1 8192 RenderObjectBump 1 1 RenderReflectionDetail 1 4 -- cgit v1.2.3 From 6a86c65e46f92f1a955d31e2d0b9d7ffcd171134 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 4 Mar 2011 15:04:46 -0600 Subject: SH-1066 Fix for bumpmaps not loading properly after enabling deferred rendering. --- indra/newview/pipeline.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c1d1a69dfb..6af371072b 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -824,6 +824,7 @@ void LLPipeline::releaseGLBuffers() mGlow[i].release(); } + gBumpImageList.destroyGL(); LLVOAvatar::resetImpostors(); } @@ -946,6 +947,8 @@ void LLPipeline::createGLBuffers() addDeferredAttachments(mGIMap); } } + + gBumpImageList.restoreGL(); } void LLPipeline::restoreGL() -- cgit v1.2.3