From 7ef6836be497a6d1fd24e50f37556f92432fc5fc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 12 Oct 2010 08:32:53 +0000 Subject: [PATCH] bugfix [#24144] Small problem with texture (r32316) an extra pixel was being drawn on a tiled image texture. --- source/blender/render/intern/source/imagetexture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index f78031c9030..5321d71194f 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -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) {