[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43509] trunk/blender/source/blender/ render/intern/source/render_texture.c: Fix #29922: NaN pixels due to bump map in degenerate case.

Brecht Van Lommel brechtvanlommel at pandora.be
Wed Jan 18 23:36:20 CET 2012


Revision: 43509
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43509
Author:   blendix
Date:     2012-01-18 22:36:19 +0000 (Wed, 18 Jan 2012)
Log Message:
-----------
Fix #29922: NaN pixels due to bump map in degenerate case.

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	2012-01-18 22:36:16 UTC (rev 43508)
+++ trunk/blender/source/blender/render/intern/source/render_texture.c	2012-01-18 22:36:19 UTC (rev 43509)
@@ -2127,7 +2127,8 @@
 			fMagnitude *= len_v3(vN);
 		}
 		
-		for(xyz=0; xyz<3; xyz++)
+		if(ntap_bump->fPrevMagnitude > 0.0f)
+			for(xyz=0; xyz<3; xyz++)
 				ntap_bump->vNacc[xyz] *= fMagnitude / ntap_bump->fPrevMagnitude;
 		
 		ntap_bump->fPrevMagnitude = fMagnitude;



More information about the Bf-blender-cvs mailing list