bugfix [#24144] Small problem with texture (r32316)

an extra pixel was being drawn on a tiled image texture.
This commit is contained in:
Campbell Barton
2010-10-12 08:32:53 +00:00
parent 3a0e563feb
commit 7ef6836be4

View File

@@ -157,8 +157,8 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, TexResult *texre
}
}
x = (int)(fx*ibuf->x);
y = (int)(fy*ibuf->y);
x = (int)floorf(fx*ibuf->x);
y = (int)floorf(fy*ibuf->y);
if(tex->extend == TEX_CLIPCUBE) {
if(x<0 || y<0 || x>=ibuf->x || y>=ibuf->y || texvec[2]<-1.0 || texvec[2]>1.0) {