Simplify checker mapping in BI when both Odd and Even are disabled

This also solves artifact mentioned in comment in T46984.
This commit is contained in:
Sergey Sharybin 2016-01-08 13:20:34 +05:00
parent c986e93a98
commit 1341f91695
1 changed files with 14 additions and 0 deletions

View File

@ -1055,6 +1055,13 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, const float tex
fx -= xs;
fy -= ys;
}
else if ((tex->flag & TEX_CHECKER_ODD) == 0 &&
(tex->flag & TEX_CHECKER_EVEN) == 0)
{
if (ima)
BKE_image_pool_release_ibuf(ima, ibuf, pool);
return retval;
}
else {
int xs1 = (int)floorf(fx - minx);
int ys1 = (int)floorf(fy - miny);
@ -1476,6 +1483,13 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], const
fx-= xs;
fy-= ys;
}
else if ((tex->flag & TEX_CHECKER_ODD) == 0 &&
(tex->flag & TEX_CHECKER_EVEN) == 0)
{
if (ima)
BKE_image_pool_release_ibuf(ima, ibuf, pool);
return retval;
}
else {
xs1= (int)floor(fx-minx);