diff options
| author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-12-15 02:41:14 +0200 |
|---|---|---|
| committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-12-15 02:41:14 +0200 |
| commit | ffccd4a2ecdebba16a2fc06f84f04fb85389f24f (patch) | |
| tree | 7dd6777b299afccf30f65cafc8d306de5b05bc46 /indra/newview/llvovolume.cpp | |
| parent | 71269ac1fc4ab19d46fd33c82b1df7a887b918bc (diff) | |
Backed out changeset: f73be0eb9d00
Diffstat (limited to 'indra/newview/llvovolume.cpp')
| -rw-r--r-- | indra/newview/llvovolume.cpp | 19 |
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)) |
