diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-08-27 16:44:36 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-08-27 16:44:36 +0400 |
commit | fe7de92c47b79aed701d5c0042a7f22bdcea545a (patch) | |
tree | bc06c080e47a1597ac90bd482e1a7c166d558f5b /source/blender/editors/sculpt_paint/paint_image_2d.c | |
parent | 2a15ecdb5d3a8b56851e587bbdf0c562bfd2252e (diff) |
Revert "Fix part of T41406"
This reverts commit 7c7cb01aa5641414d9f0c39ab81df0f57205f362.
The smoothing weights will cause shifting in the image if not calculated
as they were in the branch. Solution for better performance will be to force-clip
kernel to a square of size two for projective painting.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_2d.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_2d.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 14429eb8aca..1cba8a2cf23 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -877,10 +877,8 @@ static void paint_2d_lift_soften(ImagePaintState *s, ImBuf *ibuf, ImBuf *ibufb, for (yk = 0; yk < kernel->side; yk++) { for (xk = 0; xk < kernel->side; xk++) { - float x_offs = xk - kernel->pixel_len; - float y_offs = yk - kernel->pixel_len; - count += paint_2d_ibuf_add_if(ibuf, xi + signf(x_offs) * fabs(x_offs + 0.51f), - yi + signf(y_offs) * fabs(y_offs + 0.51f), outrgb, is_torus, + count += paint_2d_ibuf_add_if(ibuf, xi + xk - kernel->pixel_len, + yi + yk - kernel->pixel_len, outrgb, is_torus, kernel->wdata[xk + yk * kernel->side]); } } |