[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11439] branches/soc-2007-joeedh/source/ blender/render/intern/source/zbuf.c: another not-working commit, this one has a different method
Joseph Eagar
joeedh at gmail.com
Tue Jul 31 03:20:28 CEST 2007
Revision: 11439
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11439
Author: joeedh
Date: 2007-07-31 03:20:18 +0200 (Tue, 31 Jul 2007)
Log Message:
-----------
another not-working commit, this one has a different method
of combining the density functions.
Modified Paths:
--------------
branches/soc-2007-joeedh/source/blender/render/intern/source/zbuf.c
Modified: branches/soc-2007-joeedh/source/blender/render/intern/source/zbuf.c
===================================================================
--- branches/soc-2007-joeedh/source/blender/render/intern/source/zbuf.c 2007-07-31 00:37:14 UTC (rev 11438)
+++ branches/soc-2007-joeedh/source/blender/render/intern/source/zbuf.c 2007-07-31 01:20:18 UTC (rev 11439)
@@ -3456,18 +3456,13 @@
accum = 1.0f;
for (i=0, csamp=row; i<totface; i++, csamp++, samp++) {
samp->depth = csamp->depth;
- samp->clr[3] = (1.0f - csamp->clr[3])*weight[csamp->samplenr];
+ if (csamp->prev) {
+ accum = accum + weight[csamp->samplenr]*(csamp->clr[3] - csamp->prev->clr[3]);
+ } else accum = accum + weight[csamp->samplenr]*(csamp->clr[3] - 1.0f);
+ if (accum < 0.0) printf("EVIL!\n");
+ else if (accum > 1.0) printf("EVIL 2!\n");
- for (j=0; j<samplesqr; j++) {
- if (j != csamp->samplenr) {
- if (cursamp[j]->prev) prev = cursamp[j]->prev;
- else prev = &nullsamp;
-
- samp->clr[3] += (1.0f - prev->clr[3])*weight[j];
- }
- }
- samp->clr[3] = 1.0f - samp->clr[3];
- if (cursamp[csamp->samplenr]->next) cursamp[csamp->samplenr] = cursamp[csamp->samplenr]->next;
+ samp->clr[3] = accum;
}
return func;
@@ -3626,6 +3621,8 @@
while(apn) {
for(a=0; a<4; a++) {
if(apn->p[a]) {
+ if (apn->z[a] < 0) continue;
+
//printf("p: %d\n", apn->p[a]);
row[totface].depth = apn->z[a];
row[totface].p = apn->p[a];
More information about the Bf-blender-cvs
mailing list