diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-30 00:52:27 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-30 00:52:27 +0400 |
commit | 9a6468357d66f0a83fd87a24e8c023f95a8a1094 (patch) | |
tree | 271cc5fa66e4471956fc301c1f297cc7f5617e95 /source/blender/editors/sculpt_paint | |
parent | 1edf56e7a5998b5f2efdb4f96883556923376eb6 (diff) |
Fix for previous noisy stroke fix, mask didn't converge to the right strength
value, formula should have been simpler actually.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 3 |
1 files changed, 1 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 5dab192e069..0088e5aa3cb 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3764,7 +3764,6 @@ static void *do_projectpaint_thread(void *ph_v) 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 @@ static void *do_projectpaint_thread(void *ph_v) * 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) { |