Blender Internal: Add material property "Cast" which can disable both ray and buffer...
[blender.git] / source / blender / render / intern / raytrace / rayobject.cpp
index 1ef44bbdd175d7fa4342bbca17124dcf079b08a7..de6b913936390171af5dcacbed52520d371acb6e 100644 (file)
@@ -119,7 +119,7 @@ MALWAYS_INLINE int vlr_check_intersect(Isect *is, ObjectInstanceRen *obi, VlakRe
        if (is->mode == RE_RAY_MIRROR)
                return !(vlr->mat->mode & MA_ONLYCAST);
        else
-               return (is->lay & obi->lay);
+               return (vlr->mat->mode2 & MA_CASTSHADOW) && (is->lay & obi->lay);
 }
 
 MALWAYS_INLINE int vlr_check_intersect_solid(Isect *UNUSED(is), ObjectInstanceRen *UNUSED(obi), VlakRen *vlr)