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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-05-03 21:48:32 +0400
committerTon Roosendaal <ton@blender.org>2009-05-03 21:48:32 +0400
commit03a0770df57835ca3551642fc6ba879bdde9564a (patch)
treebfbf2ac198d715cf91fe1c95b86def6af0ad5f48 /source
parent56b8ce2ec17ea555dc2042ab3d843384b9d1e7cd (diff)
Bugfix #17929
Old bug (2.42): when using node material, transparent shadow did not work. It was missing to set the proper 'pass flag'. Do note an important difference with non-node materials for 'transparent shadow'. If there are no nodes, it uses the color from the unshaded material. When it has nodes, it uses the color output from the entire node tree, which is typically from shaded materials. The latter is because node shaders have no support for shade passes yet (it only outputs rgb + a).
Diffstat (limited to 'source')
-rw-r--r--source/blender/render/intern/source/rayshade.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index c6dd8d6890e..97ac8666181 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -262,13 +262,14 @@ static void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr)
shade_input_set_shade_texco(shi);
- if(is->mode==RE_RAY_SHADOW_TRA)
+ if(is->mode==RE_RAY_SHADOW_TRA) {
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);
@@ -1292,15 +1293,8 @@ static void ray_trace_shadow_tra(Isect *is, int thread, int depth, int traflag)
shi.depth= 1; /* only used to indicate tracing */
shi.mask= 1;
shi.thread= thread;
-
- /*shi.osatex= 0;
- shi.thread= shi.sample= 0;
- shi.lay= 0;
- shi.passflag= 0;
- shi.combinedflag= 0;
- shi.do_preview= 0;
- shi.light_override= NULL;
- shi.mat_override= NULL;*/
+ shi.passflag= SCE_PASS_COMBINED;
+ shi.combinedflag= 0xFFFFFF; /* ray trace does all options */
shade_ray(is, &shi, &shr);
if (traflag & RAY_TRA)