Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-01-30 19:23:14 +0300
committerTon Roosendaal <ton@blender.org>2006-01-30 19:23:14 +0300
commit6b7c992920caf93d27bd688ba04ad31084bf1b3f (patch)
tree2222c7471531da8ebad19f8ea4444d35be7fb466 /source
parent416329c477158f4daf337cdd072a82d39b663af6 (diff)
Bugfix: missing faces on edge of image
Yesterdays commit slightly extended clipping area for window, to ensure no empty borders get rendered. Unfortunately it reveiled a case in code that was never handled; clipping code was throwing away good faces. Old bug... but apparently never showed up?
Diffstat (limited to 'source')
-rw-r--r--source/blender/render/intern/source/zbuf.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index c4137a0e832..7fac9f59944 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -1299,9 +1299,14 @@ static void clippyra(float *labda, float *v1, float *v2, int *b2, int *b3, int a
da= v2[a]-v1[a];
/* prob; we clip slightly larger, osa renders add 2 pixels on edges, should become variable? */
/* or better; increase r.winx/y size, but thats quite a complex one. do it later */
- dw= 1.005f*(v2[3]-v1[3]);
- v13= 1.005f*v1[3];
-
+ if(a==2) {
+ dw= (v2[3]-v1[3]);
+ v13= v1[3];
+ }
+ else {
+ dw= 1.005f*(v2[3]-v1[3]);
+ v13= 1.005f*v1[3];
+ }
/* according the original article by Liang&Barsky, for clipping of
* homogenous coordinates with viewplane, the value of "0" is used instead of "-w" .
* This differs from the other clipping cases (like left or top) and I considered
@@ -1457,6 +1462,10 @@ void zbufclip(ZSpan *zspan, int zvlnr, float *f1, float *f2, float *f3, int c1,
if(b2==0 && b3==1) {
/* completely 'in' */;
+ vlzp[clvl][0]= vlzp[v][0];
+ vlzp[clvl][1]= vlzp[v][1];
+ vlzp[clvl][2]= vlzp[v][2];
+ clvl++;
} else if(b3==0) {
vlzp[v][0]=0;
/* completely 'out' */;