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
This commit is contained in:
Pablo Dobarro 2019-11-04 15:08:42 +01:00
parent 265295e6a6
commit a58c1d4497
1 changed files with 2 additions and 2 deletions

View File

@ -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));