Revision: 30538
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30538
Author:   blendix
Date:     2010-07-20 15:32:42 +0200 (Tue, 20 Jul 2010)

Log Message:
-----------
Fix #22910: displacement mapping not working with use alpha for image texture.

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-07-20 
13:15:25 UTC (rev 30537)
+++ trunk/blender/source/blender/render/intern/source/texture.c 2010-07-20 
13:32:42 UTC (rev 30538)
@@ -1762,7 +1762,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) && !((tex->type==TEX_IMAGE) && (tex->imaflag & 
TEX_NORMALMAP))) {
+                                               if(mtex->mapto & 
(MAP_NORM|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;
 
@@ -1833,7 +1833,7 @@
                        else continue;  // can happen when texco defines 
disappear and it renders old files
 
                        /* the pointer defines if bumping happens */
-                       if(mtex->mapto & (MAP_NORM|MAP_DISPLACE|MAP_WARP)) {
+                       if(mtex->mapto & (MAP_NORM|MAP_WARP)) {
                                texres.nor= norvec;
                                norvec[0]= norvec[1]= norvec[2]= 0.0;
                        }
@@ -2219,8 +2219,7 @@
                                }
                                
                                if(rgbnor & TEX_RGB) {
-                                       if(texres.talpha) texres.tin= texres.ta;
-                                       else texres.tin= 
(0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb);
+                                       texres.tin= 
(0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb);
                                }
 
                                factt= 
(0.5f-texres.tin)*mtex->dispfac*stencilTin; facmm= 1.0f-factt;


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to