From 0b999f4165f599372a5b97eba84e9e788085ad78 Mon Sep 17 00:00:00 2001 From: EvilSpirit Date: Fri, 24 Jun 2016 15:12:10 +0600 Subject: [PATCH] Improved outline detection condition. Before this commit, circles parallel to the camera plane caused some edges to be randomly marked as outlines. --- src/mesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh.cpp b/src/mesh.cpp index b03c9906..10a735a1 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -1052,7 +1052,7 @@ void SKdNode::MakeOutlinesInto(SOutlineList *sol) const } bool SOutline::IsVisible(Vector projDir) const { - return (nl.Dot(projDir) > 0.0) != (nr.Dot(projDir) > 0.0); + return (nl.Dot(projDir) > LENGTH_EPS) == (nr.Dot(projDir) < LENGTH_EPS); } void SOutlineList::Clear() {