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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-11-04 14:41:05 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-11-04 14:41:05 +0300
commite8f08c612b307f6b1d4acf3d3d9f548c0f39445f (patch)
treed305786491609871ee597421e0a6fecf787268c5 /source/blender
parente32a81cba293db363e9106e8a6960053edd309ed (diff)
Fix #24523: deep shadows are rendered although object's shadow casting is disabled.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/render/intern/source/strand.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c
index 88d042e7b97..be17d640b66 100644
--- a/source/blender/render/intern/source/strand.c
+++ b/source/blender/render/intern/source/strand.c
@@ -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;