[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20042] trunk/blender/source/blender/ render/intern/source/rayshade.c: Bugfix #17929
Ton Roosendaal
ton at blender.org
Sun May 3 19:48:32 CEST 2009
Revision: 20042
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20042
Author: ton
Date: 2009-05-03 19:48:32 +0200 (Sun, 03 May 2009)
Log Message:
-----------
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).
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 2009-05-03 13:22:26 UTC (rev 20041)
+++ trunk/blender/source/blender/render/intern/source/rayshade.c 2009-05-03 17:48:32 UTC (rev 20042)
@@ -262,13 +262,14 @@
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,16 +1293,9 @@
shi.depth= 1; /* only used to indicate tracing */
shi.mask= 1;
shi.thread= thread;
+ shi.passflag= SCE_PASS_COMBINED;
+ shi.combinedflag= 0xFFFFFF; /* ray trace does all options */
- /*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;*/
-
shade_ray(is, &shi, &shr);
if (traflag & RAY_TRA)
d= shade_by_transmission(is, &shi, &shr);
More information about the Bf-blender-cvs
mailing list