Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2008-08-11 09:23:36 +0400
committerMatt Ebb <matt@mke3.net>2008-08-11 09:23:36 +0400
commit04b90467c3ab6223c5f24f248c38fd6e03d227e1 (patch)
tree422078feb759bf929398c66d76702ef9b8ae203b
parentf87693090408d2bb384dce3b50bae9fa082ca253 (diff)
* 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.
-rw-r--r--source/blender/render/intern/source/rayshade.c7
1 files changed, 6 insertions, 1 deletions
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);