diff options
| author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-12-20 00:25:34 +0200 |
|---|---|---|
| committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-12-20 00:25:34 +0200 |
| commit | db8eb0f995889e222e38748dfee647058653e3f6 (patch) | |
| tree | 39a67775fcb6af910a8519b73fa9f5c288204044 /indra/newview/llvovolume.cpp | |
| parent | ccff36c8ee278129af3a8916bf931ab4ca14a76d (diff) | |
| parent | 946b28ad765dc43ad6d1c715fa93a6f7c233ce64 (diff) | |
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/newview/llvovolume.cpp')
| -rw-r--r-- | indra/newview/llvovolume.cpp | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index e573138101..098996147f 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1216,18 +1216,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; } @@ -1243,7 +1243,6 @@ BOOL LLVOVolume::calcLOD() F32 radius; F32 distance; - F32 lod_factor = LLVOVolume::sLODFactor; if (mDrawable->isState(LLDrawable::RIGGED)) { @@ -1279,18 +1278,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)) @@ -1487,6 +1480,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global) res &= face->genVolumeBBoxes(*volume, i, mRelativeXform, (mVolumeImpl && mVolumeImpl->isVolumeGlobal()) || force_global); + if (rebuild) { if (i == 0) @@ -1762,11 +1756,6 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) dirtySpatialGroup(drawable->isState(LLDrawable::IN_REBUILD_Q1)); compiled = TRUE; lodOrSculptChanged(drawable, compiled); - - if(drawable->isState(LLDrawable::REBUILD_RIGGED | LLDrawable::RIGGED)) - { - updateRiggedVolume(false); - } genBBoxes(FALSE); } // it has its own drawable (it's moved) or it has changed UVs or it has changed xforms from global<->local @@ -4218,7 +4207,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons LLVector4a* pos = dst_face.mPositions; - if (pos && dst_face.mExtents) + if( pos && weight && dst_face.mExtents ) { LL_RECORD_BLOCK_TIME(FTM_SKIN_RIGGED); |
