diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-05-07 18:58:33 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-05-07 18:58:33 +0400 |
commit | 529a8bb949412ac5cc7203fd583e4f0b28282ddf (patch) | |
tree | 7f064cc25eb0a39b2c90bde3f3f83d2b5b91982d | |
parent | fa9b01908f97825c331b68425eba6b21e9fdfaa0 (diff) |
Fix for bug #10990: edge render AA issue.
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index a18a973979a..9357a060f62 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -849,7 +849,7 @@ static void convert_to_key_alpha(RenderPart *pa, float *rectf) } /* adds only alpha values */ -void edge_enhance_tile(RenderPart *pa, float *rectf) +void edge_enhance_tile(RenderPart *pa, float *rectf, int *rectz) { /* use zbuffer to define edges, add it to the image */ int y, x, col, *rz, *rz1, *rz2, *rz3; @@ -857,13 +857,13 @@ void edge_enhance_tile(RenderPart *pa, float *rectf) float *rf; /* shift values in zbuffer 4 to the right (anti overflows), for filter we need multiplying with 12 max */ - rz= pa->rectz; + rz= rectz; if(rz==NULL) return; for(y=0; y<pa->recty; y++) for(x=0; x<pa->rectx; x++, rz++) (*rz)>>= 4; - rz1= pa->rectz; + rz1= rectz; rz2= rz1+pa->rectx; rz3= rz2+pa->rectx; @@ -903,7 +903,7 @@ void edge_enhance_tile(RenderPart *pa, float *rectf) } /* shift back zbuf values, we might need it still */ - rz= pa->rectz; + rz= rectz; for(y=0; y<pa->recty; y++) for(x=0; x<pa->rectx; x++, rz++) (*rz)<<= 4; @@ -1012,7 +1012,7 @@ void make_pixelstructs(RenderPart *pa, ZSpan *zspan, int sample, void *data) if(sdata->rl->layflag & SCE_LAY_EDGE) if(R.r.mode & R_EDGE) - edge_enhance_tile(pa, sdata->edgerect); + edge_enhance_tile(pa, sdata->edgerect, zspan->rectz); } /* main call for shading Delta Accum, for OSA */ @@ -1189,7 +1189,7 @@ void zbufshade_tile(RenderPart *pa) if(rl->layflag & SCE_LAY_EDGE) { if(R.r.mode & R_EDGE) { edgerect= MEM_callocN(sizeof(float)*pa->rectx*pa->recty, "rectedge"); - edge_enhance_tile(pa, edgerect); + edge_enhance_tile(pa, edgerect, pa->rectz); } } |