Revision: 14244
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14244
Author:   blendix
Date:     2008-03-26 15:58:34 +0100 (Wed, 26 Mar 2008)

Log Message:
-----------

Fix for bug #8747: normal map tangents didn't work correct with
splitting of non-flat quads.

Modified Paths:
--------------
    trunk/blender/source/blender/render/intern/source/shadeinput.c

Modified: trunk/blender/source/blender/render/intern/source/shadeinput.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/shadeinput.c      
2008-03-26 14:50:29 UTC (rev 14243)
+++ trunk/blender/source/blender/render/intern/source/shadeinput.c      
2008-03-26 14:58:34 UTC (rev 14244)
@@ -856,10 +856,14 @@
                        tangent= RE_vlakren_get_nmap_tangent(obr, shi->vlr, 0);
 
                        if(tangent) {
-                               s1= &tangent[shi->i1*3];
-                               s2= &tangent[shi->i2*3];
-                               s3= &tangent[shi->i3*3];
+                               int j1= shi->i1, j2= shi->i2, j3= shi->i3;
 
+                               vlr_set_uv_indices(shi->vlr, &j1, &j2, &j3);
+
+                               s1= &tangent[j1*3];
+                               s2= &tangent[j2*3];
+                               s3= &tangent[j3*3];
+
                                shi->nmaptang[0]= (tl*s3[0] - tu*s1[0] - 
tv*s2[0]);
                                shi->nmaptang[1]= (tl*s3[1] - tu*s1[1] - 
tv*s2[1]);
                                shi->nmaptang[2]= (tl*s3[2] - tu*s1[2] - 
tv*s2[2]);


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to