aboutsummaryrefslogtreecommitdiff
path: root/src/post-refinement.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-28 11:30:17 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:30 +0100
commit2a42d7f73d2e301d702f256f17b46ce84ec0fdae (patch)
tree057fc34237a231569f9b5885c6ddfe1dd2c46e73 /src/post-refinement.c
parentb0e35cd86fff9379defbac5145a09374a6695ce7 (diff)
Add divergence to gradient
Diffstat (limited to 'src/post-refinement.c')
-rw-r--r--src/post-refinement.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 449e716f..46e320e6 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -105,9 +105,9 @@ double gradient(struct image *image, int k, Reflection *refl, double r)
if ( (clamp_low == 0) && (clamp_high == 0) ) {
tt = (ttlow+tthigh)/2.0;
} else if ( clamp_high == 0 ) {
- tt = tthigh;
+ tt = tthigh + image->div;
} else if ( clamp_low == 0 ) {
- tt = ttlow;
+ tt = ttlow - image->div;
} else {
tt = 0.0;
/* Gradient should come out as zero in this case */