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:
authorCampbell Barton <ideasman42@gmail.com>2016-02-08 03:48:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-02-08 03:48:03 +0300
commitba1ca9148dad37667dae4ffb2fb75e4eedf02a77 (patch)
treede5f4069d0de1fd3297c3abb832d92eee1538a0d /source/blender/editors/sculpt_paint
parentce6ba157278f0a4da527c8fdd92213278c563d4d (diff)
Fix T47353: Project paint ignores small faces
When zoomed out - faces < 0.5 pixels across a diagonal aren't so rare, so culling them can ignore small faces.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 5c8fae6e2f7..c29840cc654 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -2096,8 +2096,9 @@ static void project_bucket_clip_face(
/* detect pathological case where face the three vertices are almost collinear in screen space.
* mostly those will be culled but when flood filling or with smooth shading it's a possibility */
- if (dist_squared_to_line_v2(v1coSS, v2coSS, v3coSS) < 0.5f ||
- dist_squared_to_line_v2(v2coSS, v3coSS, v1coSS) < 0.5f)
+ if (min_fff(dist_squared_to_line_v2(v1coSS, v2coSS, v3coSS),
+ dist_squared_to_line_v2(v2coSS, v3coSS, v1coSS),
+ dist_squared_to_line_v2(v3coSS, v1coSS, v2coSS)) < PROJ_PIXEL_TOLERANCE)
{
collinear = true;
}