diff --git a/Src/Graphics/New3D/New3D.cpp b/Src/Graphics/New3D/New3D.cpp index 639c4d6..bcda293 100644 --- a/Src/Graphics/New3D/New3D.cpp +++ b/Src/Graphics/New3D/New3D.cpp @@ -738,6 +738,8 @@ void CNew3D::DescendCullingNode(UINT32 addr) float LODscale = m_nodeAttribs.currentDisableCulling ? std::numeric_limits::max() : (fBlendRadius / std::hypot(x, y, z)); const LOD *lod = m_LODBlendTable->table[lodTablePointer].lod; + LODscale = std::clamp(LODscale, 0.0f, std::numeric_limits::max()); + if (m_nodeAttribs.currentDisableCulling || (!outsideFrustum && LODscale >= lod[3].deleteSize)) { // Descend down first link