diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-11-04 17:08:42 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-11-06 21:25:42 +0300 |
commit | a58c1d4497db73b2480bcc31dec0aa1ca98a3880 (patch) | |
tree | 6274a40194f1b0721f5ac93e89fb0c740a216185 /source/blender/editors/sculpt_paint/paint_image_2d.c | |
parent | 265295e6a6ca9935159f75fe2956ee908c06bf4f (diff) |
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
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_2d.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_2d.c | 4 |
1 files 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)); |