From 7c37b2b688f5aaf227079daaaaabe096d7f39224 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Sat, 28 Jan 2012 13:20:20 -0500 Subject: [PATCH] Use box filtering --- cuburn/code/iter.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cuburn/code/iter.py b/cuburn/code/iter.py index 7cb2514..28e2eb7 100644 --- a/cuburn/code/iter.py +++ b/cuburn/code/iter.py @@ -204,13 +204,9 @@ void iter( {{precalc_camera(pcp.camera)}} if (threadIdx.y == 5 && threadIdx.x == 4) { - float ditherwidth = {{pcp.camera.dither_width}} * 0.33f; - float u0 = mwc_next_01(rctx); - float r = ditherwidth * sqrtf(-2.0f * log2f(u0) / M_LOG2E); - - float u1 = 2.0f * M_PI * mwc_next_01(rctx); - {{pcp.camera.xo}} += r * cos(u1); - {{pcp.camera.yo}} += r * sin(u1); + float ditherwidth = {{pcp.camera.dither_width}} * 0.5f; + {{pcp.camera.xo}} += ditherwidth * mwc_next_11(rctx); + {{pcp.camera.yo}} += ditherwidth * mwc_next_11(rctx); } {{if info.acc_mode == 'global'}}