From d0409545885e334b4518f7f404a2b68dd9d1a112 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 13 Oct 2014 15:04:11 +0000 Subject: [PATCH] test: blue noise kernel generator. --- demos/test/sandbox/sample.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/demos/test/sandbox/sample.cpp b/demos/test/sandbox/sample.cpp index 9bb159f7..9e221124 100644 --- a/demos/test/sandbox/sample.cpp +++ b/demos/test/sandbox/sample.cpp @@ -18,9 +18,18 @@ using namespace lol; int main(int argc, char **argv) { - UNUSED(argc, argv); + ivec2 size(128, 128); + + if (argc > 1) + size.x = size.y = atoi(argv[1]); + if (argc > 2) + size.y = atoi(argv[2]); + + array2d vac = Image::BlueNoiseKernel(size); + for (int y = 0; y < size.y; ++y) + for (int x = 0; x < size.x; ++x) + printf("%d %d %f\n", x, y, vac[x][y]); - /* Insert any test code here */ return EXIT_SUCCESS; }