[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25959] trunk/blender/source/blender/ render/intern/source/texture.c: Fix rendering of normal maps, was broken by new bump mapping.
Brecht Van Lommel
brecht at blender.org
Wed Jan 13 12:37:08 CET 2010
Revision: 25959
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25959
Author: blendix
Date: 2010-01-13 12:37:08 +0100 (Wed, 13 Jan 2010)
Log Message:
-----------
Fix rendering of normal maps, was broken by new bump mapping.
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/texture.c
Modified: trunk/blender/source/blender/render/intern/source/texture.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/texture.c 2010-01-13 08:52:00 UTC (rev 25958)
+++ trunk/blender/source/blender/render/intern/source/texture.c 2010-01-13 11:37:08 UTC (rev 25959)
@@ -1739,7 +1739,7 @@
// NOTE: test for shi->obr->ob here, since vlr/obr/obi can be 'fake' when called from fastshade(), another reason to move it..
// NOTE: shi->v1 is NULL when called from displace_render_vert, assigning verts in this case is not trivial because the shi quad face side is not know.
if ((mtex->texflag & MTEX_NEW_BUMP) && shi->obr && shi->obr->ob && shi->v1) {
- if(mtex->mapto & (MAP_NORM|MAP_DISPLACE|MAP_WARP)) {
+ if(mtex->mapto & (MAP_NORM|MAP_DISPLACE|MAP_WARP) && !((tex->type==TEX_IMAGE) && (tex->imaflag & TEX_NORMALMAP))) {
MTFace* tf = RE_vlakren_get_tface(shi->obr, shi->vlr, i, NULL, 0);
int j1 = shi->i1, j2 = shi->i2, j3 = shi->i3;
@@ -1832,7 +1832,7 @@
nunvdone= 1;
}
- if(texres.nor) {
+ if(texres.nor && !((tex->type==TEX_IMAGE) && (tex->imaflag & TEX_NORMALMAP))) {
TexResult ttexr = {0, 0, 0, 0, 0, texres.talpha, NULL}; // temp TexResult
float tco[3], texv[3], cd, ud, vd, du, dv, idu, idv;
const int fromrgb = ((tex->type == TEX_IMAGE) || ((tex->flag & TEX_COLORBAND)!=0));
More information about the Bf-blender-cvs
mailing list