[Bf-blender-cvs] [8c8215f] master: Fix T46984: Image mapping bug

Sergey Sharybin noreply at git.blender.org
Tue Jan 5 18:45:19 CET 2016


Commit: 8c8215fb77e148e21b19a34cc10ee0e3c9680220
Author: Sergey Sharybin
Date:   Tue Jan 5 22:41:41 2016 +0500
Branches: master
https://developer.blender.org/rB8c8215fb77e148e21b19a34cc10ee0e3c9680220

Fix T46984: Image mapping bug

The issue was caused by wrong scaling applied on top of the image sampling.

It seems there's no reason to apply alpha clipping when using EWA filtering,
this filtering currently works in the way that it apples all needed clipping
and scaling to a clipped kernel already.

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

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 b44c013..e64c3d4 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -1248,7 +1248,9 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, const float tex
 				texres->ta += levf*(texr.ta - texres->ta);
 			}
 
-			alpha_clip_aniso(ibuf, fx-minx, fy-miny, fx+minx, fy+miny, extflag, texres);
+			if (tex->texfilter != TXF_EWA) {
+				alpha_clip_aniso(ibuf, fx-minx, fy-miny, fx+minx, fy+miny, extflag, texres);
+			}
 		}
 	}
 	else {	/* no mipmap */
@@ -1290,7 +1292,9 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, const float tex
 		}
 		else {
 			filterfunc(texres, ibuf, fx, fy, &AFD);
-			alpha_clip_aniso(ibuf, fx-minx, fy-miny, fx+minx, fy+miny, extflag, texres);
+			if (tex->texfilter != TXF_EWA) {
+				alpha_clip_aniso(ibuf, fx-minx, fy-miny, fx+minx, fy+miny, extflag, texres);
+			}
 		}
 	}




More information about the Bf-blender-cvs mailing list