[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56397] trunk/blender/source/blender/ editors/sculpt_paint/paint_image_proj.c: Fix for previous noisy stroke fix, mask didn't converge to the right strength

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Apr 29 22:52:28 CEST 2013


Revision: 56397
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56397
Author:   blendix
Date:     2013-04-29 20:52:27 +0000 (Mon, 29 Apr 2013)
Log Message:
-----------
Fix for previous noisy stroke fix, mask didn't converge to the right strength
value, formula should have been simpler actually.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c	2013-04-29 20:21:19 UTC (rev 56396)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c	2013-04-29 20:52:27 UTC (rev 56397)
@@ -3764,7 +3764,6 @@
 	float co[2];
 	unsigned short mask_short;
 	const float brush_alpha = BKE_brush_alpha_get(ps->scene, brush);
-	const float sqrt_brush_alpha = sqrtf(brush_alpha);
 	const float brush_radius = (float)BKE_brush_size_get(ps->scene, brush);
 	const float brush_radius_sq = brush_radius * brush_radius; /* avoid a square root with every dist comparison */
 
@@ -3897,7 +3896,7 @@
 							 * and never exceeds it, which gives nice smooth results. */
 							float mask_accum = projPixel->mask_accum;
 
-							mask = mask_accum + (sqrt_brush_alpha * 65535.0f - mask_accum) * sqrt_brush_alpha * mask;
+							mask = mask_accum + (brush_alpha * 65535.0f - mask_accum) * mask;
 							mask_short = (unsigned short)mask;
 
 							if (mask_short > projPixel->mask_accum) {




More information about the Bf-blender-cvs mailing list