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-06-15 14:10:27 +0400
committerTon Roosendaal <ton@blender.org>2006-06-15 14:10:27 +0400
commitecb204fa7c53414f47c8870ae460807c8ca82e7b (patch)
tree4a68d6e525cebb53584302c092badc2858d82452 /source
parent6deb0cf41af903661a63c30aeaa11cefca9fd11b (diff)
Bugfix #4338
When Edge render was choosen, the zbuffer values were altered, causing a halo render to go wrong.
Diffstat (limited to 'source')
-rw-r--r--source/blender/render/intern/source/rendercore.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 778c46eea1a..7cdf05c4958 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -2688,13 +2688,12 @@ static void edge_enhance_calc(RenderPart *pa, float *rectf)
int zval1, zval2, zval3;
float *rf;
- /* shift values in zbuffer 4 to the right, for filter we need multiplying with 12 max */
+ /* shift values in zbuffer 4 to the right (anti overflows), for filter we need multiplying with 12 max */
rz= pa->rectz;
if(rz==NULL) return;
- for(y=0; y<pa->recty; y++) {
+ for(y=0; y<pa->recty; y++)
for(x=0; x<pa->rectx; x++, rz++) (*rz)>>= 4;
- }
rz1= pa->rectz;
rz2= rz1+pa->rectx;
@@ -2733,6 +2732,12 @@ static void edge_enhance_calc(RenderPart *pa, float *rectf)
rz3+= 2;
rf+= 2;
}
+
+ /* shift back zbuf values, we might need it still */
+ rz= pa->rectz;
+ for(y=0; y<pa->recty; y++)
+ for(x=0; x<pa->rectx; x++, rz++) (*rz)<<= 4;
+
}
static void edge_enhance_add(RenderPart *pa, float *rectf, float *arect)