[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11343] trunk/blender/source/blender/ render/intern/source/shadeoutput.c: =Rendering Bugfix=

Joseph Eagar joeedh at gmail.com
Mon Jul 23 04:28:52 CEST 2007


Revision: 11343
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11343
Author:   joeedh
Date:     2007-07-23 04:28:47 +0200 (Mon, 23 Jul 2007)

Log Message:
-----------
=Rendering Bugfix=

For some odd reason, shadow calculation was skipped if diffuse was 0.0.  This
however would cause errors where specularity would ignore shadows.  After all,
just because the shaded diffuse of a point is fully black, doesn't mean
the specularity highlight doesn't include that point.

Ton: you might want to look at this, though it's just a one-liner.

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

Modified: trunk/blender/source/blender/render/intern/source/shadeoutput.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/shadeoutput.c	2007-07-23 02:24:07 UTC (rev 11342)
+++ trunk/blender/source/blender/render/intern/source/shadeoutput.c	2007-07-23 02:28:47 UTC (rev 11343)
@@ -1235,7 +1235,7 @@
 	/* shadow and spec, (visifac==0 outside spot) */
 	if(visifac> 0.0f) {
 		
-		if(i>0.0f && (R.r.mode & R_SHADOW)) {
+		if((R.r.mode & R_SHADOW)) {
 			if(ma->mode & MA_SHADOW) {
 				if(lar->shb || (lar->mode & LA_SHAD_RAY)) {
 					
@@ -1259,7 +1259,7 @@
 			}
 		}
 		
-		/* in case 'no diffuse' we still do most calculus, spec can be in shadow */
+		/* in case 'no diffuse' we still do most calculus, spec can be in shadow.*/
 		if(!(lar->mode & LA_NO_DIFF)) {
 			if(i>0.0f) {
 				if(ma->mode & MA_SHADOW_TRA)





More information about the Bf-blender-cvs mailing list