Fix #24523: deep shadows are rendered although object's shadow casting is disabled.

This commit is contained in:
Brecht Van Lommel
2010-11-04 11:41:05 +00:00
parent e32a81cba2
commit e8f08c612b

View File

@@ -825,6 +825,8 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, APixstrand *apixbuf, ListBa
/* for all object instances */
for(obi=re->instancetable.first, i=0; obi; obi=obi->next, i++) {
Material *ma;
obr= obi->obr;
if(!obr->strandbuf || !(obr->strandbuf->lay & lay))
@@ -836,6 +838,14 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, APixstrand *apixbuf, ListBa
else
copy_m4_m4(obwinmat, winmat);
/* test if we should skip it */
ma = obr->strandbuf->ma;
if(shadow && !(ma->mode & MA_SHADBUF))
continue;
else if(!shadow && (ma->mode & MA_ONLYCAST))
continue;
if(clip_render_object(obi->obr->boundbox, bounds, winmat))
continue;