[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12369] branches/qdune/blender/source/ blender/render/intern/source/texture.c: Temporary solution for the exaggerated gridcrack problem when

Alfredo de Greef eeshlo at yahoo.com
Wed Oct 24 08:08:00 CEST 2007


Revision: 12369
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12369
Author:   eeshlo
Date:     2007-10-24 08:08:00 +0200 (Wed, 24 Oct 2007)

Log Message:
-----------
Temporary solution for the exaggerated gridcrack problem when
displacement is used. Blender then still calculates a bump normal
vector. There seems to be some problem with Blender's method
of calculating a normal vector from intensity values.
Central differencing might improve the result, but would make
it more 'expensive'.
For now, calculation of normal is disabled when only displacement
is required. Needs some better solution.

Modified Paths:
--------------
    branches/qdune/blender/source/blender/render/intern/source/texture.c

Modified: branches/qdune/blender/source/blender/render/intern/source/texture.c
===================================================================
--- branches/qdune/blender/source/blender/render/intern/source/texture.c	2007-10-24 02:50:37 UTC (rev 12368)
+++ branches/qdune/blender/source/blender/render/intern/source/texture.c	2007-10-24 06:08:00 UTC (rev 12369)
@@ -1489,8 +1489,13 @@
 			
 			/* de pointer defines if bumping happens */
 			if(mtex->mapto & (MAP_NORM|MAP_DISPLACE|MAP_WARP)) {
-				texres.nor= norvec;
-				norvec[0]= norvec[1]= norvec[2]= 0.0;
+				/* QDUNE: do not calculate normal if only displacement is needed */
+				if ((R.r.renderer == R_QDUNE) && (mtex->mapto == MAP_DISPLACE))
+					texres.nor= NULL;
+				else {
+					texres.nor= norvec;
+					norvec[0]= norvec[1]= norvec[2]= 0.0;
+				}
 			}
 			else texres.nor= NULL;
 			





More information about the Bf-blender-cvs mailing list