Fix #24523: deep shadows are rendered although object's shadow casting is disabled.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user