[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30046] branches/render25/source/blender/ render/intern/source/diskocclusion.c: Fix environment/ indirect light not taking shader into account correctly
Brecht Van Lommel
brecht at blender.org
Tue Jul 6 16:41:21 CEST 2010
Revision: 30046
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30046
Author: blendix
Date: 2010-07-06 16:41:21 +0200 (Tue, 06 Jul 2010)
Log Message:
-----------
Fix environment/indirect light not taking shader into account correctly
for approximate AO.
Modified Paths:
--------------
branches/render25/source/blender/render/intern/source/diskocclusion.c
Modified: branches/render25/source/blender/render/intern/source/diskocclusion.c
===================================================================
--- branches/render25/source/blender/render/intern/source/diskocclusion.c 2010-07-06 14:30:31 UTC (rev 30045)
+++ branches/render25/source/blender/render/intern/source/diskocclusion.c 2010-07-06 14:41:21 UTC (rev 30046)
@@ -52,6 +52,7 @@
#include "database.h"
#include "diskocclusion.h"
#include "environment.h"
+#include "material.h"
#include "object.h"
#include "object_mesh.h"
#include "part.h"
@@ -1098,6 +1099,7 @@
{
OcclusionTree *tree= re->db.occlusiontree;
PixelCache *cache;
+ float color[3];
if(tree) {
if(shi->primitive.strand) {
@@ -1127,6 +1129,10 @@
zero_v3(shi->shading.env);
zero_v3(shi->shading.indirect);
}
+
+ mat_color(color, &shi->material);
+ mul_v3_v3(shi->shading.env, color);
+ mul_v3_v3(shi->shading.indirect, color);
}
void disk_occlusion_cache_create(Render *re, RenderPart *pa, ShadeSample *ssamp)
More information about the Bf-blender-cvs
mailing list