Revision: 37644
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37644
Author:   zanqdo
Date:     2011-06-19 20:41:41 +0000 (Sun, 19 Jun 2011)
Log Message:
-----------
By Morten S. Mikkelsen; this adds support for tangent bump shading

left: legacy bump, righ: sparkybump

http://pasteall.org/pic/show.php?id=13875

bugs [#26320], [#27506]

there's still an issue with texture OSA as you can see

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

Modified: trunk/blender/source/blender/render/intern/source/render_texture.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/render_texture.c  
2011-06-19 19:45:46 UTC (rev 37643)
+++ trunk/blender/source/blender/render/intern/source/render_texture.c  
2011-06-19 20:41:41 UTC (rev 37644)
@@ -2620,6 +2620,12 @@
                        }
                }
        }
+       if ((use_compat_bump || use_ntap_bump) && (shi->mat->mode & 
MA_TANGENT_V)!=0) {
+               const float fnegdot = -dot_v3v3(shi->vn, shi->tang);
+               // apply Gram-Schmidt projection
+               madd_v3_v3fl(shi->tang,  shi->vn, fnegdot);
+               normalize_v3(shi->tang);
+       }
 }
 
 

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

Reply via email to