summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 217b8bfbc2..657babd92c 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1214,18 +1214,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 +1241,6 @@ BOOL LLVOVolume::calcLOD()
F32 radius;
F32 distance;
- F32 lod_factor = LLVOVolume::sLODFactor;
if (mDrawable->isState(LLDrawable::RIGGED))
{
@@ -1277,18 +1276,12 @@ BOOL LLVOVolume::calcLOD()
distance *= rampDist;
}
-
+ // DON'T Compensate for field of view changing on FOV zoom.
distance *= F_PI/3.f;
- static LLCachedControl<bool> ignore_fov_zoom(gSavedSettings,"IgnoreFOVZoomForLODs");
- if(!ignore_fov_zoom)
- {
- lod_factor *= DEFAULT_FIELD_OF_VIEW / LLViewerCamera::getInstance()->getDefaultFOV();
- }
-
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) &&
mDrawable->getFace(0))