[Bf-blender-cvs] [a58c1d4497d] blender-v2.81-release: Fix 2D paint antialiasing offset

Pablo Dobarro noreply at git.blender.org
Wed Nov 6 19:22:52 CET 2019


Commit: a58c1d4497db73b2480bcc31dec0aa1ca98a3880
Author: Pablo Dobarro
Date:   Mon Nov 4 15:08:42 2019 +0100
Branches: blender-v2.81-release
https://developer.blender.org/rBa58c1d4497db73b2480bcc31dec0aa1ca98a3880

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

===================================================================

M	source/blender/editors/sculpt_paint/paint_image_2d.c

===================================================================

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



More information about the Bf-blender-cvs mailing list