[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13188] branches/soc-2007-joeedh/source/ blender/render/intern: Removed cruft that will interfere with merge, most likely.
Joseph Eagar
joeedh at gmail.com
Thu Jan 10 00:22:34 CET 2008
Revision: 13188
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13188
Author: joeedh
Date: 2008-01-10 00:22:34 +0100 (Thu, 10 Jan 2008)
Log Message:
-----------
Removed cruft that will interfere with merge, most likely.
I did leave in the de-globalfication of zbuf.c I did, though I'm
not sure if I need it anymore, I think it's a good thing anyway.
Modified Paths:
--------------
branches/soc-2007-joeedh/source/blender/render/intern/include/zbuf.h
branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c
branches/soc-2007-joeedh/source/blender/render/intern/source/shadbuf.c
branches/soc-2007-joeedh/source/blender/render/intern/source/zbuf.c
Modified: branches/soc-2007-joeedh/source/blender/render/intern/include/zbuf.h
===================================================================
--- branches/soc-2007-joeedh/source/blender/render/intern/include/zbuf.h 2008-01-09 23:07:34 UTC (rev 13187)
+++ branches/soc-2007-joeedh/source/blender/render/intern/include/zbuf.h 2008-01-09 23:22:34 UTC (rev 13188)
@@ -77,7 +77,6 @@
float *minp1, *maxp1, *minp2, *maxp2; /* vertex pointers detect min/max range in */
float *span1, *span2;
- float clipsta, clipend;
float zmulx, zmuly, zofsx, zofsy; /* transform from hoco to zbuf co */
int *rectz, *arectz; /* zbuffers, arectz is for transparant */
@@ -95,16 +94,6 @@
void (*zbuffunc)(struct ZSpan *, int, float *, float *, float *, float *);
void (*zbuflinefunc)(struct ZSpan *, int, float *, float *);
-
- /*used by dsm to get linear Z*/
- void (*hoco_to_zco)(struct ZSpan *zspan, float clipsta, float clipend, float *zco, float *hoco);
- void *hoco_data;
-
- /* maximum difference between depths of pixel samples.
- this is used by he transparent zbuffer functions,
- to avoid anti-aliasing (or deep shadow map blurring) problems
- if two tranparent faces intersect.*/
- int recombine_maxsize;
} ZSpan;
#define MAX_VLACKBUCKET 4096
@@ -121,18 +110,18 @@
} VlakBucket;
/* exported to shadbuf.c */
-void zbufclip4(struct Render *re, struct ZSpan *zspan, float clipsta, float clipend, int zvlnr, float *f1, float *f2, float *f3, float *f4, int c1, int c2, int c3, int c4);
+void zbufclip4(struct Render *re, struct ZSpan *zspan, int zvlnr, float *f1, float *f2, float *f3, float *f4, int c1, int c2, int c3, int c4);
void zbuf_free_span(struct ZSpan *zspan);
/* to rendercore.c */
void zspan_scanconvert(struct ZSpan *zpan, void *handle, float *v1, float *v2, float *v3, void (*func)(void *, int, int, float, float) );
/* exported to edge render... */
-void zbufclip(struct Render *re, struct ZSpan *zspan, float clipsta, float clipend, int zvlnr, float *f1, float *f2, float *f3, int c1, int c2, int c3);
+void zbufclip(struct Render *re, struct ZSpan *zspan, int zvlnr, float *f1, float *f2, float *f3, int c1, int c2, int c3);
void zbuf_alloc_span(struct ZSpan *zspan, int rectx, int recty);
-void zbufclipwire(struct ZSpan *zspan, float clipsta, float clipend, int zvlnr, struct VlakRen *vlr);
+void zbufclipwire(struct ZSpan *zspan, int zvlnr, struct VlakRen *vlr);
-void hoco_to_zco(struct ZSpan *zspan, float clipsta, float clipend, float *zco, float *hoco);
+void hoco_to_zco(struct ZSpan *zspan, float *zco, float *hoco);
#endif
Modified: branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c
===================================================================
--- branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c 2008-01-09 23:07:34 UTC (rev 13187)
+++ branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c 2008-01-09 23:22:34 UTC (rev 13188)
@@ -136,14 +136,14 @@
#define FINDBOUNDS(minx, miny, maxx, maxy, vlr) {\
minx = miny = 232634.0f;\
maxx = maxy = -2342343.0f;\
- hoco_to_zco(&span, shb->clipsta, shb->clipend, co, vlr->v1->ho);\
+ hoco_to_zco(&span, co, vlr->v1->ho);\
FINDMINMAX(minx, miny, maxx, maxy, co)\
- hoco_to_zco(&span, shb->clipsta, shb->clipend, co, vlr->v2->ho);\
+ hoco_to_zco(&span, co, vlr->v2->ho);\
FINDMINMAX(minx, miny, maxx, maxy, co)\
- hoco_to_zco(&span, shb->clipsta, shb->clipend, co, vlr->v3->ho);\
+ hoco_to_zco(&span, co, vlr->v3->ho);\
FINDMINMAX(minx, miny, maxx, maxy, co)\
if (vlr->v4) {\
- hoco_to_zco(&span, shb->clipsta, shb->clipend, co, vlr->v4->ho);\
+ hoco_to_zco(&span, co, vlr->v4->ho);\
FINDMINMAX(minx, miny, maxx, maxy, co) } }
void DSM_FreeZbufferBucket(ListBase *bucket)
@@ -156,8 +156,6 @@
}
}
-void linear_hoco_to_zco(ZSpan *zspan, float clipsta, float clipend, float *zco, float *hoco);
-
ListBase *DSM_FillZbufferBuckets(Render *re, ShadBuf *shb, int sizex, int sizey, int tsizex,
int tsizey, int tilex, int tiley, float borderx, float bordery)
{
@@ -169,7 +167,6 @@
ZSpan span;
memset(&span, 0, sizeof(span));
- span.hoco_to_zco = linear_hoco_to_zco;
span.zmulx = mulx = ((float)sizex) / 2.0;
span.zmuly = muly = ((float)sizey) / 2.0;
@@ -1883,7 +1880,6 @@
memset(&zspan, 0, sizeof(zspan));
- zspan.hoco_to_zco = linear_hoco_to_zco;
zspan.zofsx = zspan.zofsy = 0.0f; //-0.5f;
zspan.zmulx = ((float)rectx) / 2.0f;
zspan.zmuly = ((float)recty) / 2.0f;
@@ -1904,8 +1900,8 @@
QUATCOPY(vez, v1);
QUATCOPY(vez+4, v2);
if( clipline(vez, vez+4)) {
- hoco_to_zco(&zspan, clipsta, clipend, vez, vez);
- hoco_to_zco(&zspan, clipsta, clipend, vez+4, vez+4);
+ hoco_to_zco(&zspan, vez, vez);
+ hoco_to_zco(&zspan, vez+4, vez+4);
QUATCOPY(v1, vez);
QUATCOPY(v2, vez+4);
@@ -1914,8 +1910,8 @@
}
}
- hoco_to_zco(&zspan, clipsta, clipend, vez, v1);
- hoco_to_zco(&zspan, clipsta, clipend, vez+4, v2);
+ hoco_to_zco(&zspan, vez, v1);
+ hoco_to_zco(&zspan, vez+4, v2);
QUATCOPY(v1, vez);
QUATCOPY(v2, vez+4);
@@ -1933,7 +1929,6 @@
memset(&zspan, 0, sizeof(zspan));
- zspan.hoco_to_zco = linear_hoco_to_zco;
zspan.zofsx = zspan.zofsy = -0.5f;
zspan.zmulx = ((float)rectx) / 2.0f;
zspan.zmuly = ((float)recty) / 2.0f;
@@ -1960,8 +1955,8 @@
QUATCOPY(vez, f1);
QUATCOPY(vez+4, f2);
if( clipline(vez, vez+4)) {
- hoco_to_zco(&zspan, clipsta, clipend, vez, vez);
- hoco_to_zco(&zspan, clipsta, clipend, vez+4, vez+4);
+ hoco_to_zco(&zspan, vez, vez);
+ hoco_to_zco(&zspan, vez+4, vez+4);
}
QUATCOPY(v1, vez);
@@ -1970,8 +1965,8 @@
}
}
- hoco_to_zco(&zspan, clipsta, clipend, vez, f1);
- hoco_to_zco(&zspan, clipsta, clipend, vez+4, f2);
+ hoco_to_zco(&zspan, vez, f1);
+ hoco_to_zco(&zspan, vez+4, f2);
QUATCOPY(v1, vez);
QUATCOPY(v2, vez+4);
Modified: branches/soc-2007-joeedh/source/blender/render/intern/source/shadbuf.c
===================================================================
--- branches/soc-2007-joeedh/source/blender/render/intern/source/shadbuf.c 2008-01-09 23:07:34 UTC (rev 13187)
+++ branches/soc-2007-joeedh/source/blender/render/intern/source/shadbuf.c 2008-01-09 23:22:34 UTC (rev 13188)
@@ -1496,15 +1496,15 @@
/* ***** NO WIRE YET */
if(ma->mode & MA_WIRE)
- zbufclipwire(&zspan, shb->clipsta, shb->clipend, a+1, vlr);
+ zbufclipwire(&zspan, a+1, vlr);
else if(vlr->v4) {
if(vlr->flag & R_STRAND)
- zbufclip4(re, &zspanstrand, shb->clipsta, shb->clipend, a+1, hoco[0], hoco[1], hoco[2], hoco[3], c1, c2, c3, c4);
+ zbufclip4(re, &zspanstrand, a+1, hoco[0], hoco[1], hoco[2], hoco[3], c1, c2, c3, c4);
else
- zbufclip4(re, &zspan, shb->clipsta, shb->clipend, a+1, hoco[0], hoco[1], hoco[2], hoco[3], c1, c2, c3, c4);
+ zbufclip4(re, &zspan, a+1, hoco[0], hoco[1], hoco[2], hoco[3], c1, c2, c3, c4);
}
else
- zbufclip(re, &zspan, shb->clipsta, shb->clipend, a+1, hoco[0], hoco[1], hoco[2], c1, c2, c3);
+ zbufclip(re, &zspan, a+1, hoco[0], hoco[1], hoco[2], c1, c2, c3);
}
}
Modified: branches/soc-2007-joeedh/source/blender/render/intern/source/zbuf.c
===================================================================
--- branches/soc-2007-joeedh/source/blender/render/intern/source/zbuf.c 2008-01-09 23:07:34 UTC (rev 13187)
+++ branches/soc-2007-joeedh/source/blender/render/intern/source/zbuf.c 2008-01-09 23:22:34 UTC (rev 13188)
@@ -91,7 +91,6 @@
zspan->rectx= rectx;
zspan->recty= recty;
- zspan->hoco_to_zco = NULL;
zspan->span1= MEM_mallocN(recty*sizeof(float), "zspan");
zspan->span2= MEM_mallocN(recty*sizeof(float), "zspan");
@@ -411,13 +410,13 @@
apn= ap;
while(apn) {
if(apn->p[0]==0) {apn->p[0]= zvlnr; apn->z[0]= zverg; apn->mask[0]= mask; break; }
- if(apn->p[0]==zvlnr && ABS(apn->z[0] - zverg) <= zspan->recombine_maxsize) {apn->mask[0]|= mask; break; }
+ if(apn->p[0]==zvlnr) {apn->mask[0]|= mask; break; }
if(apn->p[1]==0) {apn->p[1]= zvlnr; apn->z[1]= zverg; apn->mask[1]= mask; break; }
- if(apn->p[1]==zvlnr && ABS(apn->z[1] - zverg) <= zspan->recombine_maxsize) {apn->mask[1]|= mask; break; }
+ if(apn->p[1]==zvlnr) {apn->mask[1]|= mask; break; }
if(apn->p[2]==0) {apn->p[2]= zvlnr; apn->z[2]= zverg; apn->mask[2]= mask; break; }
- if(apn->p[2]==zvlnr && ABS(apn->z[2] - zverg) <= zspan->recombine_maxsize) {apn->mask[2]|= mask; break; }
+ if(apn->p[2]==zvlnr) {apn->mask[2]|= mask; break; }
if(apn->p[3]==0) {apn->p[3]= zvlnr; apn->z[3]= zverg; apn->mask[3]= mask; break; }
- if(apn->p[3]==zvlnr && ABS(apn->z[3] - zverg) <= zspan->recombine_maxsize) {apn->mask[3]|= mask; break; }
+ if(apn->p[3]==zvlnr) {apn->mask[3]|= mask; break; }
// if(apn->p[i]==0) {apn->p[i]= zvlnr; apn->z[i]= zverg; apn->mask[i]= mask; break; }
// if(apn->p[i]==zvlnr) {apn->mask[i]|= mask; break; }
if(apn->next==NULL) apn->next= addpsA(zspan);
@@ -497,13 +496,13 @@
apn= ap;
while(apn) { /* loop unrolled */
if(apn->p[0]==0) {apn->p[0]= zvlnr; apn->z[0]= vergz; apn->mask[0]= mask; break; }
- if(apn->p[0]==zvlnr && ABS(apn->z[0] - vergz) <= zspan->recombine_maxsize) {apn->mask[0]|= mask; break; }
+ if(apn->p[0]==zvlnr) {apn->mask[0]|= mask; break; }
if(apn->p[1]==0) {apn->p[1]= zvlnr; apn->z[1]= vergz; apn->mask[1]= mask; break; }
- if(apn->p[1]==zvlnr && ABS(apn->z[1] - vergz) <= zspan->recombine_maxsize) {apn->mask[1]|= mask; break; }
+ if(apn->p[1]==zvlnr) {apn->mask[1]|= mask; break; }
if(apn->p[2]==0) {apn->p[2]= zvlnr; apn->z[2]= vergz; apn->mask[2]= mask; break; }
- if(apn->p[2]==zvlnr && ABS(apn->z[2] - vergz) <= zspan->recombine_maxsize) {apn->mask[2]|= mask; break; }
+ if(apn->p[2]==zvlnr) {apn->mask[2]|= mask; break; }
if(apn->p[3]==0) {apn->p[3]= zvlnr; apn->z[3]= vergz; apn->mask[3]= mask; break; }
- if(apn->p[3]==zvlnr && ABS(apn->z[3] - vergz) <= zspan->recombine_maxsize) {apn->mask[3]|= mask; break; }
+ if(apn->p[3]==zvlnr) {apn->mask[3]|= mask; break; }
if(apn->next==0) apn->next= addpsA(zspan);
apn= apn->next;
}
@@ -882,51 +881,17 @@
return 0;
}
-void linear_hoco_to_zco(ZSpan *zspan, float clipsta, float clipend, float *zco, float *hoco)
+void hoco_to_zco(ZSpan *zspan, float *zco, float *hoco)
{
- float div, z = hoco[2];
-
- if (G.rt != 30) {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list