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:
parent
c9fc3874d6
commit
858c7acd5b
@ -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);
|
||||
externtex(mtex, co, &intensity,
|
||||
rgba, rgba + 1, rgba + 2, rgba + 3, 0, pool);
|
||||
|
||||
if (hasrgb & TEX_RGB)
|
||||
texres.tin = rgb_to_grayscale(&texres.tr) * texres.ta;
|
||||
|
||||
return texres.tin;
|
||||
return intensity;
|
||||
}
|
||||
|
||||
void paint_get_tex_pixel_col(MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool)
|
||||
|
Loading…
Reference in New Issue
Block a user