[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13763] trunk/blender/source/blender:
Brecht Van Lommel
brechtvanlommel at pandora.be
Tue Feb 19 12:07:10 CET 2008
Revision: 13763
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13763
Author: blendix
Date: 2008-02-19 12:07:09 +0100 (Tue, 19 Feb 2008)
Log Message:
-----------
Bug #8234: sky texture for approximate AO doesn't work, as mentioned
in the commit log. Couldn't get this to work well, probably this would
work a lot better with the IBL spherical harmonics feature, so I've just
disabled the option in the interface for now.
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/occlusion.c
trunk/blender/source/blender/src/buttons_shading.c
Modified: trunk/blender/source/blender/render/intern/source/occlusion.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/occlusion.c 2008-02-19 10:47:29 UTC (rev 13762)
+++ trunk/blender/source/blender/render/intern/source/occlusion.c 2008-02-19 11:07:09 UTC (rev 13763)
@@ -1284,6 +1284,7 @@
}
if(occ) *occ= resultocc;
+ if(bentn) Normalize(bentn);
}
static void occ_compute_passes(Render *re, OcclusionTree *tree, int totpass)
@@ -1342,18 +1343,23 @@
if(aocolor) {
/* sky shading using bent normal */
- if(aocolor==WO_AOSKYCOL) {
+ if(ELEM(aocolor, WO_AOSKYCOL, WO_AOSKYTEX)) {
fac= 0.5*(1.0f+bn[0]*re->grvec[0]+ bn[1]*re->grvec[1]+ bn[2]*re->grvec[2]);
skycol[0]= (1.0f-fac)*re->wrld.horr + fac*re->wrld.zenr;
skycol[1]= (1.0f-fac)*re->wrld.horg + fac*re->wrld.zeng;
skycol[2]= (1.0f-fac)*re->wrld.horb + fac*re->wrld.zenb;
}
+#if 0
else { /* WO_AOSKYTEX */
+ bn[0]= -bn[0];
+ bn[1]= -bn[1];
+ bn[2]= -bn[2];
dxyview[0]= 1.0f;
dxyview[1]= 1.0f;
dxyview[2]= 0.0f;
shadeSkyView(skycol, co, bn, dxyview);
}
+#endif
VecMulf(skycol, occlusion);
}
Modified: trunk/blender/source/blender/src/buttons_shading.c
===================================================================
--- trunk/blender/source/blender/src/buttons_shading.c 2008-02-19 10:47:29 UTC (rev 13762)
+++ trunk/blender/source/blender/src/buttons_shading.c 2008-02-19 11:07:09 UTC (rev 13763)
@@ -2240,8 +2240,9 @@
X3CLM1, yco-=BUTH, BUTW3, BUTH, &wrld->aocolor, 2.0, (float)WO_AOPLAIN, 0, 0, "Plain diffuse energy (white)");
uiDefButS(block, ROW, B_REDR, "Sky Color",
X3CLM2, yco, BUTW3, BUTH, &wrld->aocolor, 2.0, (float)WO_AOSKYCOL, 0, 0, "Use horizon and zenith color for diffuse energy");
- uiDefButS(block, ROW, B_REDR, "Sky Texture",
- X3CLM3, yco, BUTW3, BUTH, &wrld->aocolor, 2.0, (float)WO_AOSKYTEX, 0, 0, "Does full Sky texture render for diffuse energy");
+ if(wrld->ao_gather_method == WO_AOGATHER_RAYTRACE)
+ uiDefButS(block, ROW, B_REDR, "Sky Texture",
+ X3CLM3, yco, BUTW3, BUTH, &wrld->aocolor, 2.0, (float)WO_AOSKYTEX, 0, 0, "Does full Sky texture render for diffuse energy");
uiBlockEndAlign(block);
yco -= YSPACE;
More information about the Bf-blender-cvs
mailing list