diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-11 18:43:31 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-11 18:43:31 +0300 |
commit | d98603129ca30aabe29f17f28f4ac72dbc0ca4ac (patch) | |
tree | 0216329ae9aaba7706eedc1f8aa25a35107aa16e /source/blender/render | |
parent | 4746fbd8ce9edf4c898fb690ffff0c664636d769 (diff) |
Added an option "Cast Approximate" to control if a material should cast
shadow when using approximate AO, separate from "Traceable".
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/occlusion.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index d06339f75cc..3f825613d12 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -629,6 +629,7 @@ static OcclusionTree *occ_tree_build(Render *re) OcclusionTree *tree; ObjectInstanceRen *obi; ObjectRen *obr; + Material *ma; VlakRen *vlr= NULL; int a, b, c, totface; @@ -640,7 +641,9 @@ static OcclusionTree *occ_tree_build(Render *re) if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++; - if((vlr->mat->mode & MA_TRACEBLE) && (vlr->mat->material_type == MA_TYPE_SURFACE)) + ma= vlr->mat; + + if((ma->shade_flag & MA_APPROX_OCCLUSION) && (ma->material_type == MA_TYPE_SURFACE)) totface++; } } @@ -677,7 +680,9 @@ static OcclusionTree *occ_tree_build(Render *re) if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak; else vlr++; - if((vlr->mat->mode & MA_TRACEBLE) && (vlr->mat->material_type == MA_TYPE_SURFACE)) { + ma= vlr->mat; + + if((ma->shade_flag & MA_APPROX_OCCLUSION) && (ma->material_type == MA_TYPE_SURFACE)) { tree->face[b].obi= c; tree->face[b].facenr= a; tree->occlusion[b]= 1.0f; |