Syncing Orange branch with bf-blender
authorTon Roosendaal <ton@blender.org>
Wed, 30 Nov 2005 13:58:01 +0000 (13:58 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 30 Nov 2005 13:58:01 +0000 (13:58 +0000)
1  2 
source/blender/render/intern/source/rendercore.c
source/blender/src/editscreen.c

index 303d83cde14a53c94cf797a015e01c33a61865cb,73d57e453b83eeb932857f0754babc2c520570ca..98c82019fa4f1f1f4958b783b0c9a0928cacdd2a
@@@ -2007,7 -2006,7 +2006,20 @@@ void shade_input_set_coords(ShadeInput 
                                        shi->dyuv[0]= 2.0*(dl*uv3[0]-duv[0]*uv1[0]-duv[1]*uv2[0]);
                                        shi->dyuv[1]= 2.0*(dl*uv3[1]-duv[0]*uv1[1]-duv[1]*uv2[1]);
                                }
--                              
++#if 0
++                              {       /* tangent derived from UV, comes back later! (ton) */
++                                      //float s1= uv2[0] - uv1[0];
++                                      //float s2= uv3[0] - uv1[0];
++                                      float t1= uv2[1] - uv1[1];
++                                      float t2= uv3[1] - uv1[1];
++                                      
++                                      shi->vn[0]= (t2 * (v2->co[0]-v1->co[0]) - t1 * (v3->co[0]-v1->co[0])); 
++                                      shi->vn[1]= (t2 * (v2->co[1]-v1->co[1]) - t1 * (v3->co[1]-v1->co[1]));
++                                      shi->vn[2]= (t2 * (v2->co[2]-v1->co[2]) - t1 * (v3->co[2]-v1->co[2]));
++                                      Normalise(shi->vn);
++                                      vlr->flag |= R_TANGENT;
++                              }                                       
++#endif
                                if(mode & MA_FACETEXTURE) {
                                        if((mode & (MA_VERTEXCOL|MA_VERTEXCOLP))==0) {
                                                shi->vcol[0]= 1.0;
Simple merge