diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-23 16:03:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-23 16:03:34 +0400 |
commit | f88ad3f04894d37028bb35ffdbd39636d57a37cb (patch) | |
tree | cdafaf6f6384c89fc622714ac9289ac1dabccfb3 /source/blender/blenkernel | |
parent | 6fdd00f7096aff680641177a3820473de050a3b6 (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')
-rw-r--r-- | source/blender/blenkernel/BKE_brush.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 16 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h index 0e406a16d0c..25d0eb5bc36 100644 --- a/source/blender/blenkernel/BKE_brush.h +++ b/source/blender/blenkernel/BKE_brush.h @@ -62,7 +62,7 @@ float brush_curve_strength_clamp(struct Brush *br, float p, const float len); float brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */ /* sampling */ -void brush_sample_tex(struct Brush *brush, float *xy, float *rgba); +void brush_sample_tex(struct Brush *brush, float *xy, float *rgba, const int thread); void brush_imbuf_new(struct Brush *brush, short flt, short texfalloff, int size, struct ImBuf **imbuf); 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]); diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 07b712c4330..6b75f5d417c 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3686,7 +3686,7 @@ static void get_cpa_texture(DerivedMesh *dm, Material *ma, int face_index, float else VECCOPY(texco,orco); - externtex(mtex, texco, &value, rgba, rgba+1, rgba+2, rgba+3); + externtex(mtex, texco, &value, rgba, rgba+1, rgba+2, rgba+3, 0); if((event & mtex->pmapto) & MAP_PA_TIME){ if((setvars&MAP_PA_TIME)==0){ ptex->time=0.0; @@ -3740,7 +3740,7 @@ void psys_get_texture(ParticleSimulationData *sim, Material *ma, ParticleData *p psys_particle_on_emitter(sim->psmd,sim->psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,0,0,0,texco, 0); } - externtex(mtex, texco, &value, rgba, rgba+1, rgba+2, rgba+3); + externtex(mtex, texco, &value, rgba, rgba+1, rgba+2, rgba+3, 0); if((event & mtex->pmapto) & MAP_PA_TIME){ /* the first time has to set the base value for time regardless of blend mode */ |