diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-04-16 20:22:26 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-04-16 20:22:26 +0400 |
commit | 858c7acd5bfda4039e12f8a2e41617c818efafb3 (patch) | |
tree | 3d605476185a3df747a0f636a3da07c98c13b43a /source/blender/editors/sculpt_paint/paint_utils.c | |
parent | c9fc3874d68630c3a4ebeca0c7ae964e5c9a901f (diff) |
Fix: texture scaling for sculpting is different between overlay and
stroke. The reason is that we use a different sampling function.
Reported by Michalis Zissiou, thanks!
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 18ecd0cec84..c3f555e032b 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -179,16 +179,13 @@ float paint_calc_object_space_radius(ViewContext *vc, const float center[3], float paint_get_tex_pixel(MTex *mtex, float u, float v, struct ImagePool *pool) { - TexResult texres = {0}; + float intensity, rgba[4]; float co[3] = {u, v, 0.0f}; - int hasrgb; - - hasrgb = multitex_ext(mtex->tex, co, NULL, NULL, 0, &texres, pool); - if (hasrgb & TEX_RGB) - texres.tin = rgb_to_grayscale(&texres.tr) * texres.ta; + externtex(mtex, co, &intensity, + rgba, rgba + 1, rgba + 2, rgba + 3, 0, pool); - return texres.tin; + return intensity; } void paint_get_tex_pixel_col(MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool) |