Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-02-15 14:39:06 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-02-15 14:40:13 +0300
commit5723aa8c0254f553aa8057006589af434317652f (patch)
tree72afdf04c2b205c749914d5e1f62d2282ddfa1a7 /intern/cycles/blender
parentb36e26bbcea7c47a406e7c4457057b9ae5eb7d91 (diff)
Cycles: Fix wrong pointiness caused by precision issues
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r--intern/cycles/blender/blender_mesh.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index e269be61791..5032c925306 100644
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@ -589,12 +589,12 @@ static void attr_create_pointiness(Scene *scene,
const float3 &other_vert_co = mesh->verts[other_vert_index];
/* We are too far away now, we wouldn't have duplicate. */
if ((other_vert_co.x + other_vert_co.y + other_vert_co.z) -
- (vert_co.x + vert_co.y + vert_co.z) > 0.0f)
+ (vert_co.x + vert_co.y + vert_co.z) > 3 * FLT_EPSILON)
{
break;
}
/* Found duplicate. */
- if(other_vert_co == vert_co) {
+ if(len_squared(other_vert_co - vert_co) < FLT_EPSILON) {
found = true;
vert_orig_index[vert_index] = other_vert_index;
break;