diff --git a/src/consts.h b/src/consts.h new file mode 100644 index 0000000..aa35bfd --- /dev/null +++ b/src/consts.h @@ -0,0 +1,14 @@ +#ifndef CONSTS_H +#define CONSTS_H + +// TODO: Eventually, export this into a better place (i.e., such that we do not have to recompile every time we change a parameter) +const int VOLUME_WIDTH = 49; +const int VOLUME_HEIGHT = 51; +const int VOLUME_DEPTH = 42; + +const int IMAGE_WIDTH = 2560; +const int IMAGE_HEIGHT = 1440; + +const int SAMPLES_PER_PIXEL = 8; // TODO: Right now uses simple variance, consider using something more advanced (e.g., some commonly-used noise map) + +#endif // CONSTS_H \ No newline at end of file diff --git a/src/main.cu b/src/main.cu index 969d538..2a9c66e 100644 --- a/src/main.cu +++ b/src/main.cu @@ -9,16 +9,7 @@ #include "linalg/linalg.h" #include "objs/sphere.h" #include "img/handler.h" - -// TODO: Eventually, export this into a better place (i.e., such that we do not have to recompile every time we change a parameter) -static const int VOLUME_WIDTH = 49; -static const int VOLUME_HEIGHT = 51; -static const int VOLUME_DEPTH = 42; - -static const int IMAGE_WIDTH = 2560; -static const int IMAGE_HEIGHT = 1440; - -static const int SAMPLES_PER_PIXEL = 8; // TODO: Right now uses simple variance, consider using something more advanced (e.g., some commonly-used noise map) +#include "consts.h" __constant__ int d_volumeWidth;