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>2011-02-21 21:06:52 +0300
committerTon Roosendaal <ton@blender.org>2011-02-21 21:06:52 +0300
commit33887fa41dcc010a8543e8bc78d1b2de23fcd099 (patch)
tree7d00a6e68b29dbbeecfafed491d6e011e6681721 /source
parent3459c1b26cae80429046df7f84f8752eb13fd339 (diff)
Bugfix #26116
Node materials with 'ray transparency' set now work again. Fix provided by Ervin Weber, thanks a lot!
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/material.c2
-rw-r--r--source/blender/render/intern/source/rayshade.c2
-rw-r--r--source/blender/render/intern/source/shadeinput.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 954de9c86e2..0b1cbd60432 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -872,7 +872,7 @@ static void init_render_nodetree(bNodeTree *ntree, Material *basemat, int r_mode
if(ma!=basemat) {
do_init_render_material(ma, r_mode, amb);
basemat->texco |= ma->texco;
- basemat->mode_l |= ma->mode_l;
+ basemat->mode_l |= ma->mode_l & ~(MA_TRANSP|MA_ZTRANSP|MA_RAYTRANSP);
}
}
else if(node->type==NODE_GROUP)
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 00092b8b053..a12e5889031 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -1502,7 +1502,7 @@ void ray_trace(ShadeInput *shi, ShadeResult *shr)
float diff[3];
int do_tra, do_mir;
- do_tra= ((shi->mat->mode & MA_TRANSP) && (shi->mat->mode & MA_RAYTRANSP) && shr->alpha!=1.0f && (shi->depth <= shi->mat->ray_depth_tra));
+ do_tra= ((shi->mode & MA_TRANSP) && (shi->mode & MA_RAYTRANSP) && shr->alpha!=1.0f && (shi->depth <= shi->mat->ray_depth_tra));
do_mir= ((shi->mat->mode & MA_RAYMIRROR) && shi->ray_mirror!=0.0f && (shi->depth <= shi->mat->ray_depth));
/* raytrace mirror amd refract like to separate the spec color */
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index e4f0de688be..81b2203cbcf 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -133,13 +133,13 @@ void shade_material_loop(ShadeInput *shi, ShadeResult *shr)
/* depth >= 1 when ray-shading */
if(shi->depth==0 || shi->volume_depth > 0) {
if(R.r.mode & R_RAYTRACE) {
- if(shi->ray_mirror!=0.0f || ((shi->mat->mode & MA_TRANSP) && (shi->mat->mode & MA_RAYTRANSP) && shr->alpha!=1.0f)) {
+ if(shi->ray_mirror!=0.0f || ((shi->mode & MA_TRANSP) && (shi->mode & MA_RAYTRANSP) && shr->alpha!=1.0f)) {
/* ray trace works on combined, but gives pass info */
ray_trace(shi, shr);
}
}
/* disable adding of sky for raytransp */
- if((shi->mat->mode & MA_TRANSP) && (shi->mat->mode & MA_RAYTRANSP))
+ if((shi->mode & MA_TRANSP) && (shi->mode & MA_RAYTRANSP))
if((shi->layflag & SCE_LAY_SKY) && (R.r.alphamode==R_ADDSKY))
shr->alpha= 1.0f;
}