[Bf-blender-cvs] [1341f91] master: Simplify checker mapping in BI when both Odd and Even are disabled

Sergey Sharybin noreply at git.blender.org
Fri Jan 8 09:21:33 CET 2016


Commit: 1341f91695cf249d0f971c90c780dd9e76281e72
Author: Sergey Sharybin
Date:   Fri Jan 8 13:20:34 2016 +0500
Branches: master
https://developer.blender.org/rB1341f91695cf249d0f971c90c780dd9e76281e72

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

This also solves artifact mentioned in comment in T46984.

===================================================================

M	source/blender/render/intern/source/imagetexture.c

===================================================================

diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index e64c3d4..0401052 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -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);




More information about the Bf-blender-cvs mailing list