From 04b90467c3ab6223c5f24f248c38fd6e03d227e1 Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Mon, 11 Aug 2008 05:23:36 +0000 Subject: * 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. --- source/blender/render/intern/source/rayshade.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 1155d2ea817..c352a83d0f4 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -263,7 +263,12 @@ static void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr) 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); -- cgit v1.2.3