From 2a42d7f73d2e301d702f256f17b46ce84ec0fdae Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 28 Jun 2011 11:30:17 +0200 Subject: Add divergence to gradient --- src/post-refinement.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.3