[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16052] trunk/blender/source/blender/ render/intern/source/rayshade.c: * Fix for a bug zanqdo reported in IRC - transparent shadows were not

Matt Ebb matt at mke3.net
Mon Aug 11 07:23:36 CEST 2008


Revision: 16052
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16052
Author:   broken
Date:     2008-08-11 07:23:36 +0200 (Mon, 11 Aug 2008)

Log Message:
-----------
* Fix for a bug zanqdo reported in IRC - transparent shadows were not 
getting correct alpha when cast through node materials - in fact the 
node tree wasn't being shaded at all.

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

Modified: trunk/blender/source/blender/render/intern/source/rayshade.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/rayshade.c	2008-08-11 05:12:42 UTC (rev 16051)
+++ trunk/blender/source/blender/render/intern/source/rayshade.c	2008-08-11 05:23:36 UTC (rev 16052)
@@ -263,7 +263,12 @@
 	shade_input_set_shade_texco(shi);
 	
 	if(is->mode==RE_RAY_SHADOW_TRA) 
-		shade_color(shi, shr);
+		if(shi->mat->nodetree && shi->mat->use_nodes) {
+			ntreeShaderExecTree(shi->mat->nodetree, shi, shr);
+			shi->mat= vlr->mat;		/* shi->mat is being set in nodetree */
+		}
+		else
+			shade_color(shi, shr);
 	else {
 		if(shi->mat->nodetree && shi->mat->use_nodes) {
 			ntreeShaderExecTree(shi->mat->nodetree, shi, shr);





More information about the Bf-blender-cvs mailing list