From a05529928f1a0c420e7a66b32d7c1e2c9e58395f Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Tue, 9 Aug 2022 00:52:52 +0100 Subject: [PATCH] Revise comment about outline normals. --- src/lib.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ca86acd..c9e8088 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -81,10 +81,15 @@ pub enum GenerateOutlineNormalsError { /// Extension methods for [`Mesh`]. pub trait OutlineMeshExt { - /// Generates outline normals for the mesh by normalising the sum of the regular normals. + /// Generates outline normals for the mesh from the regular normals. /// - /// To the extent that outline normals are not perpendicular to the surface of the mesh, - /// this may result in non-uniform outline thickness. + /// Vertex extrusion only works for meshes with smooth surface normals. Hard edges cause + /// visual artefacts. This function generates faux-smooth normals for outlining purposes + /// by grouping vertices by their position and averaging the normals at each point. These + /// outline normals are then inserted as a separate vertex attribute so that the regular + /// normals remain untouched. However, insofar as the outline normals are not + /// perpendicular to the surface of the mesh, this technique may result in non-uniform + /// outline thickness. /// /// This function will silently do nothing if the outline normals would be equal to the /// regular normals.