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
path: root/source
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-02-19 18:46:05 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-02-19 18:48:51 +0300
commitb1d02f3d576629b9573847ab9a4f52251032cb21 (patch)
treebd934a82a792b9c98c65c0cff05ffe29fc39a853 /source
parentefb20dacc6561cee831f1dfc546ef33083d4df80 (diff)
Projective painting: Only dither if factor is more than zero
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 15a65cd3e3a..1c8e9fedd73 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4299,7 +4299,12 @@ static void do_projectpaint_draw(ProjPaintState *ps, ProjPixel *projPixel, const
copy_v3_v3(rgb, ps->paint_color);
}
- float_to_byte_dither_v3(rgba_ub, rgb, dither, u, v);
+ if (dither > 0.0f) {
+ float_to_byte_dither_v3(rgba_ub, rgb, dither, u, v);
+ }
+ else {
+ F3TOCHAR3(rgb, rgba_ub);
+ }
rgba_ub[3] = f_to_char(mask);
if (ps->do_masking) {
@@ -4489,7 +4494,13 @@ static void *do_projectpaint_thread(void *ph_v)
}
else {
linearrgb_to_srgb_v3_v3(color_f, color_f);
- float_to_byte_dither_v3(projPixel->newColor.ch, color_f, ps->dither, projPixel->x_px, projPixel->y_px);
+
+ if (ps->dither > 0.0f) {
+ float_to_byte_dither_v3(projPixel->newColor.ch, color_f, ps->dither, projPixel->x_px, projPixel->y_px);
+ }
+ else {
+ F3TOCHAR3(color_f, projPixel->newColor.ch);
+ }
projPixel->newColor.ch[3] = FTOCHAR(color_f[3]);
IMB_blend_color_byte(projPixel->pixel.ch_pt, projPixel->origColor.ch_pt,
projPixel->newColor.ch, ps->blend);