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!
This commit is contained in:
@@ -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)
|
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};
|
float co[3] = {u, v, 0.0f};
|
||||||
int hasrgb;
|
|
||||||
|
|
||||||
hasrgb = multitex_ext(mtex->tex, co, NULL, NULL, 0, &texres, pool);
|
externtex(mtex, co, &intensity,
|
||||||
|
rgba, rgba + 1, rgba + 2, rgba + 3, 0, pool);
|
||||||
|
|
||||||
if (hasrgb & TEX_RGB)
|
return intensity;
|
||||||
texres.tin = rgb_to_grayscale(&texres.tr) * texres.ta;
|
|
||||||
|
|
||||||
return texres.tin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void paint_get_tex_pixel_col(MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool)
|
void paint_get_tex_pixel_col(MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool)
|
||||||
|
Reference in New Issue
Block a user