From 49e1049d6f56155160a3cbd173ebdc82efb5788d Mon Sep 17 00:00:00 2001 From: Raymond Wan Date: Tue, 28 May 2019 01:00:17 -0400 Subject: [PATCH] Change tiles to 1x1 --- src/global.h | 4 ++-- src/metrics.cpp | 4 ++++ src/render.cpp | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/global.h b/src/global.h index c06a86a..f13e283 100644 --- a/src/global.h +++ b/src/global.h @@ -15,8 +15,8 @@ #define USE_GLOBAL_ILLUMINATION 1 #define NUM_PT_SAMPLES 1 -#define TILE_X 16 -#define TILE_Y 16 +#define TILE_X 1 +#define TILE_Y 1 #define NUM_THREADS 8 #endif diff --git a/src/metrics.cpp b/src/metrics.cpp index 2001b18..fd002f3 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -27,6 +27,10 @@ void print_run_info() { puts("Hello Rays."); puts("========================================================================"); printf("NUM THREADS: %d\n", NUM_THREADS); + if (NUM_THREADS > 1) { + printf("TILE_X: %d\n", TILE_X); + printf("TILE_Y: %d\n", TILE_Y); + } printf("WIDTH: %d\n", WIDTH); printf("HEIGHT: %d\n", HEIGHT); printf("MAX DEPTH: %d\n", MAX_DEPTH); diff --git a/src/render.cpp b/src/render.cpp index d340937..212a81a 100644 --- a/src/render.cpp +++ b/src/render.cpp @@ -23,7 +23,7 @@ void construct_tiles(std::queue *jq) { for (int i = 0; i < num_tiles_w; i++) { for (int j = 0; j < num_tiles_h; j++) { Tile t; - t.top_right = rwm_v2_init(i*16, j*16); + t.top_right = rwm_v2_init(i*TILE_X, j*TILE_Y); jq->push(t); } }