From a58c1d4497db73b2480bcc31dec0aa1ca98a3880 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 4 Nov 2019 15:08:42 +0100 Subject: Fix 2D paint antialiasing offset The AA offset should be substracted, not added. I think this was introduced when I refactored the code in a code review. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6186 --- source/blender/editors/sculpt_paint/paint_image_2d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index a1e67e78a10..004caae8a00 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -402,8 +402,8 @@ static unsigned short *brush_painter_curve_mask_new(BrushPainter *painter, float aa_step = 1.0f / (float)aa_samples; float bpos[2]; - bpos[0] = pos[0] - floorf(pos[0]) + offset + aa_offset; - bpos[1] = pos[1] - floorf(pos[1]) + offset + aa_offset; + bpos[0] = pos[0] - floorf(pos[0]) + offset - aa_offset; + bpos[1] = pos[1] - floorf(pos[1]) + offset - aa_offset; const float co = cosf(DEG2RADF(rotation)); const float si = sinf(DEG2RADF(rotation)); -- cgit v1.2.3