Merge branch 'FixLODIssueWithObjectPaging' into 'master'

LOD issue with object paging

See merge request OpenMW/openmw!1007

(cherry picked from commit 5688b7b4d8df93fbf28307d2259c57f8d878eeb8)

269cd310 Use same world coordinates to compute distances
pull/593/head
psi29a 4 years ago
parent 74aa7cdd48
commit a21da63464

@ -477,8 +477,7 @@ namespace MWRender
constexpr auto copyMask = ~Mask_UpdateVisitor;
AnalyzeVisitor analyzeVisitor(copyMask);
osg::Vec3f center3 = { center.x(), center.y(), 0.f };
analyzeVisitor.mCurrentDistance = (viewPoint - center3).length2();
analyzeVisitor.mCurrentDistance = (viewPoint - worldCenter).length2();
float minSize = mMinSize;
if (mMinSizeMergeFactor)
minSize *= mMinSizeMergeFactor;

Loading…
Cancel
Save