From f01cac08e782aa1037dfd2b11eb6df7c3ab8418c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 7 Jan 2011 15:41:24 +0000 Subject: [PATCH] Fix #25078: texture mapping options (e.g. size) not working correctly with bump. This problem was in both new bump and new new bump. The derivatives used for bump mapping did not include the mapping, which gave mismatched offset for the taps, now just do the mapping beforehand. --- source/blender/render/intern/source/texture.c | 53 +++++++++---------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index 75ad38e381b..a2b0b817d7c 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -1818,7 +1818,6 @@ void do_material_tex(ShadeInput *shi) if(texres.nor && !((tex->type==TEX_IMAGE) && (tex->imaflag & TEX_NORMALMAP))) { TexResult ttexr = {0, 0, 0, 0, 0, texres.talpha, NULL}; // temp TexResult - float texv[3]; const int fromrgb = ((tex->type == TEX_IMAGE) || ((tex->flag & TEX_COLORBAND)!=0)); const float Hscale = 0.016f * Tnor*stencilTin*mtex->norfac; // factor 0.016 proved to look like the previous bump code @@ -1837,12 +1836,14 @@ void do_material_tex(ShadeInput *shi) float STll[3], STlr[3], STul[3]; float Hll, Hlr, Hul; + texco_mapping(shi, tex, mtex, co, dx, dy, texvec, dxt, dyt); + for(c=0; c