mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Use box filtering
This commit is contained in:
parent
899b8082da
commit
7c37b2b688
@ -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'}}
|
||||||
|
Loading…
Reference in New Issue
Block a user