[Bf-blender-cvs] [cba027c] master: Fix T41140

Antony Riakiotakis noreply at git.blender.org
Thu Jul 31 12:15:49 CEST 2014


Commit: cba027c8c3699374f4b1a13716fb367382b8650d
Author: Antony Riakiotakis
Date:   Thu Jul 31 12:15:38 2014 +0200
Branches: master
https://developer.blender.org/rBcba027c8c3699374f4b1a13716fb367382b8650d

Fix T41140

Yet another attempt to fix the annoying lines that crop up in texture
painting on edges and quads. I feel this needs better investigation but
using pixel tolerance here looks like alleviates the issue.

===================================================================

M	source/blender/editors/sculpt_paint/paint_image_proj.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index c27cbff..a0ffdbb 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -2301,8 +2301,8 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
 	/* Use tf_uv_pxoffset instead of tf->uv so we can offset the UV half a pixel
 	 * this is done so we can avoid offsetting all the pixels by 0.5 which causes
 	 * problems when wrapping negative coords */
-	xhalfpx = (0.5f + (PROJ_GEOM_TOLERANCE * (1.0f / 3.0f))) / ibuf_xf;
-	yhalfpx = (0.5f + (PROJ_GEOM_TOLERANCE * (1.0f / 4.0f))) / ibuf_yf;
+	xhalfpx = (0.5f + (PROJ_PIXEL_TOLERANCE * (1.0f / 3.0f))) / ibuf_xf;
+	yhalfpx = (0.5f + (PROJ_PIXEL_TOLERANCE * (1.0f / 4.0f))) / ibuf_yf;
 
 	/* Note about (PROJ_GEOM_TOLERANCE/x) above...
 	 * Needed to add this offset since UV coords are often quads aligned to pixels.




More information about the Bf-blender-cvs mailing list