1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-05 18:19:41 +00:00

Use same distance for all lod instances of a chunk

This commit is contained in:
CedricMocquillon 2021-06-12 15:33:53 +02:00
parent f92fbc2acd
commit 7fa67ff675

View file

@ -477,6 +477,8 @@ namespace MWRender
constexpr auto copyMask = ~Mask_UpdateVisitor;
AnalyzeVisitor analyzeVisitor(copyMask);
osg::Vec3f center3 = { center.x(), center.y(), 0.f };
analyzeVisitor.mCurrentDistance = (viewPoint - center3).length2();
float minSize = mMinSize;
if (mMinSizeMergeFactor)
minSize *= mMinSizeMergeFactor;
@ -546,7 +548,6 @@ namespace MWRender
continue;
}
analyzeVisitor.mCurrentDistance = dSqr;
auto emplaced = nodes.emplace(cnode, InstanceList());
if (emplaced.second)
{