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:
authorCampbell Barton <ideasman42@gmail.com>2010-09-23 16:03:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-23 16:03:34 +0400
commitf88ad3f04894d37028bb35ffdbd39636d57a37cb (patch)
treecdafaf6f6384c89fc622714ac9289ac1dabccfb3 /source/blender/blenkernel/intern/brush.c
parent6fdd00f7096aff680641177a3820473de050a3b6 (diff)
bugfix [#23595] Texture paint with a node based brush produces artifacts
also changed displace modifier not to link object depgraph when not using object texturespace.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 90ea562be9d..c67db9382f3 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -480,7 +480,7 @@ int brush_clone_image_delete(Brush *brush)
}
/* Brush Sampling */
-void brush_sample_tex(Brush *brush, float *xy, float *rgba)
+void brush_sample_tex(Brush *brush, float *xy, float *rgba, const int thread)
{
MTex *mtex= &brush->mtex;
@@ -493,7 +493,7 @@ void brush_sample_tex(Brush *brush, float *xy, float *rgba)
co[1]= xy[1]/radius;
co[2]= 0.0f;
- hasrgb= externtex(mtex, co, &tin, &tr, &tg, &tb, &ta);
+ hasrgb= externtex(mtex, co, &tin, &tr, &tg, &tb, &ta, thread);
if (hasrgb) {
rgba[0]= tr;
@@ -547,12 +547,12 @@ void brush_imbuf_new(Brush *brush, short flt, short texfall, int bufsize, ImBuf
dstf[3]= alpha*brush_curve_strength_clamp(brush, dist, radius);
}
else if (texfall == 1) {
- brush_sample_tex(brush, xy, dstf);
+ brush_sample_tex(brush, xy, dstf, 0);
}
else {
dist = sqrt(xy[0]*xy[0] + xy[1]*xy[1]);
- brush_sample_tex(brush, xy, rgba);
+ brush_sample_tex(brush, xy, rgba, 0);
dstf[0] = rgba[0]*brush->rgb[0];
dstf[1] = rgba[1]*brush->rgb[1];
@@ -583,7 +583,7 @@ void brush_imbuf_new(Brush *brush, short flt, short texfall, int bufsize, ImBuf
dst[3]= FTOCHAR(alpha*brush_curve_strength(brush, dist, radius));
}
else if (texfall == 1) {
- brush_sample_tex(brush, xy, rgba);
+ brush_sample_tex(brush, xy, rgba, 0);
dst[0]= FTOCHAR(rgba[0]);
dst[1]= FTOCHAR(rgba[1]);
dst[2]= FTOCHAR(rgba[2]);
@@ -592,7 +592,7 @@ void brush_imbuf_new(Brush *brush, short flt, short texfall, int bufsize, ImBuf
else {
dist = sqrt(xy[0]*xy[0] + xy[1]*xy[1]);
- brush_sample_tex(brush, xy, rgba);
+ brush_sample_tex(brush, xy, rgba, 0);
dst[0] = FTOCHAR(rgba[0]*brush->rgb[0]);
dst[1] = FTOCHAR(rgba[1]*brush->rgb[1]);
dst[2] = FTOCHAR(rgba[2]*brush->rgb[2]);
@@ -739,7 +739,7 @@ static void brush_painter_do_partial(BrushPainter *painter, ImBuf *oldtexibuf, i
xy[0] = x + xoff;
xy[1] = y + yoff;
- brush_sample_tex(brush, xy, tf);
+ brush_sample_tex(brush, xy, tf, 0);
}
bf[0] = tf[0]*mf[0];
@@ -770,7 +770,7 @@ static void brush_painter_do_partial(BrushPainter *painter, ImBuf *oldtexibuf, i
xy[0] = x + xoff;
xy[1] = y + yoff;
- brush_sample_tex(brush, xy, rgba);
+ brush_sample_tex(brush, xy, rgba, 0);
t[0]= FTOCHAR(rgba[0]);
t[1]= FTOCHAR(rgba[1]);
t[2]= FTOCHAR(rgba[2]);