Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2019-10-30 18:57:11 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-10-31 16:45:26 +0300
commitcd827194f7cc771e9947d474ba0e7c4ae2a2aa9a (patch)
tree2040eabed0a939853a08a30d0b930ad1f1458424 /source/blender/editors/sculpt_paint
parentbe2bdaf6aab672feb1961e2b6a2fd09f979bba2e (diff)
Paint: Option to disable antialiasing
You may want to disable antialiasing if you are working with pixel art or low resolution textures. It is enabled by default. Reviewed By: jbakker, campbellbarton Differential Revision: https://developer.blender.org/D6044
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index 9c95a3cee4d..a1e67e78a10 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -387,7 +387,12 @@ static unsigned short *brush_painter_curve_mask_new(BrushPainter *painter,
m = mask;
int aa_samples = 1.0f / (radius * 0.20f);
- aa_samples = clamp_i(aa_samples, 3, 16);
+ if (brush->sampling_flag & BRUSH_PAINT_ANTIALIASING) {
+ aa_samples = clamp_i(aa_samples, 3, 16);
+ }
+ else {
+ aa_samples = 1;
+ }
/* Temporal until we have the brush properties */
const float hardness = 1.0f;