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>2013-10-15 12:44:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-10-15 12:44:13 +0400
commitfaafd7b7e2fa549bf2b51d43790b5c0e25f4f40a (patch)
tree30543c36a999400e9c4d779cc07e06dabc9d46c0 /source/blender/editors/sculpt_paint
parent885bc95387628ecb5513e8012b69820e524d0ac8 (diff)
fix [#37082] Texture paint artefact
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 0e6c62f40d0..66d09c77cea 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -164,6 +164,7 @@ BLI_INLINE unsigned char f_to_char(const float val)
/* used for testing doubles, if a point is on a line etc */
#define PROJ_GEOM_TOLERANCE 0.00075f
+#define PROJ_PIXEL_TOLERANCE 0.01f
/* vert flags */
#define PROJ_VERT_CULL 1
@@ -2007,8 +2008,8 @@ static void project_bucket_clip_face(
/* remove doubles */
/* first/last check */
- if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_GEOM_TOLERANCE &&
- fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_GEOM_TOLERANCE)
+ if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_PIXEL_TOLERANCE &&
+ fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_PIXEL_TOLERANCE)
{
(*tot)--;
}
@@ -2024,8 +2025,8 @@ static void project_bucket_clip_face(
while (doubles == TRUE) {
doubles = FALSE;
for (i = 1; i < (*tot); i++) {
- if (fabsf(isectVCosSS[i - 1][0] - isectVCosSS[i][0]) < PROJ_GEOM_TOLERANCE &&
- fabsf(isectVCosSS[i - 1][1] - isectVCosSS[i][1]) < PROJ_GEOM_TOLERANCE)
+ if (fabsf(isectVCosSS[i - 1][0] - isectVCosSS[i][0]) < PROJ_PIXEL_TOLERANCE &&
+ fabsf(isectVCosSS[i - 1][1] - isectVCosSS[i][1]) < PROJ_PIXEL_TOLERANCE)
{
int j;
for (j = i + 1; j < (*tot); j++) {