Blender Internal: Add material property "Cast" which can disable both ray and buffer...
[blender.git] / source / blender / render / intern / source / shadbuf.c
index 194397bb19cede3224c1ec6765c0338b7c1d050f..ed820737a0f6a94e88899ffcd49fa457842d7f71 100644 (file)
@@ -660,7 +660,7 @@ static void shadowbuf_autoclip(Render *re, LampRen *lar)
                        if (vlr->mat!= ma) {
                                ma= vlr->mat;
                                ok= 1;
-                               if ((ma->mode & MA_SHADBUF)==0) ok= 0;
+                               if ((ma->mode2 & MA_CASTSHADOW)==0 || (ma->mode & MA_SHADBUF)==0) ok= 0;
                        }
                        
                        if (ok && (obi->lay & lay)) {
@@ -2013,7 +2013,7 @@ static void isb_bsp_fillfaces(Render *re, LampRen *lar, ISBBranch *root)
                        if (vlr->mat!= ma) {
                                ma= vlr->mat;
                                ok= 1;
-                               if ((ma->mode & MA_SHADBUF)==0) ok= 0;
+                               if ((ma->mode2 & MA_CASTSHADOW)==0 || (ma->mode & MA_SHADBUF)==0) ok= 0;
                                if (ma->material_type == MA_TYPE_WIRE) ok= 0;
                                zspanstrand.shad_alpha= zspan.shad_alpha= ma->shad_alpha;
                        }