Use box filtering

This commit is contained in:
Steven Robertson 2012-01-28 13:20:20 -05:00
parent 899b8082da
commit 7c37b2b688

View File

@ -204,13 +204,9 @@ void iter(
{{precalc_camera(pcp.camera)}} {{precalc_camera(pcp.camera)}}
if (threadIdx.y == 5 && threadIdx.x == 4) { if (threadIdx.y == 5 && threadIdx.x == 4) {
float ditherwidth = {{pcp.camera.dither_width}} * 0.33f; float ditherwidth = {{pcp.camera.dither_width}} * 0.5f;
float u0 = mwc_next_01(rctx); {{pcp.camera.xo}} += ditherwidth * mwc_next_11(rctx);
float r = ditherwidth * sqrtf(-2.0f * log2f(u0) / M_LOG2E); {{pcp.camera.yo}} += ditherwidth * mwc_next_11(rctx);
float u1 = 2.0f * M_PI * mwc_next_01(rctx);
{{pcp.camera.xo}} += r * cos(u1);
{{pcp.camera.yo}} += r * sin(u1);
} }
{{if info.acc_mode == 'global'}} {{if info.acc_mode == 'global'}}