From 2f5db2e45b7a8af51b15c45bb41f5dcb49ae9d4d Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 2 Aug 2016 16:05:20 +0200 Subject: [PATCH] Fix T48986: Incorrect normals or tangents when using custom split normals. (Re)-setting custom normals could cause some unwanted splitting of some of them, leading to slightly different tangent space. Simply enlarged slightly the threshold detecting similar normals as identical ones for now, afarid this is the kind of issue that cannot get a full complete solution for until we drop floats... --- source/blender/blenkernel/intern/mesh_evaluate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index 1c86fbcfe8e..fa113ef5eef 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -434,7 +434,7 @@ MLoopNorSpace *BKE_lnor_space_create(MLoopNorSpaceArray *lnors_spacearr) } /* This threshold is a bit touchy (usual float precision issue), this value seems OK. */ -#define LNOR_SPACE_TRIGO_THRESHOLD (1.0f - 1e-6f) +#define LNOR_SPACE_TRIGO_THRESHOLD (1.0f - 1e-4f) /* Should only be called once. * Beware, this modifies ref_vec and other_vec in place!