#pragma once

#if 0
	#define WHITTED
#else
	#define PATH_TRACE
#endif

#define NUM_RENDER_THREADS 2
#define PIXEL_STEP 1
#define TILE_SIZE 10
#define MAX_DEPTH 4 //maximum recursion depth
//#define SAVE_INTERMEDIARY
#ifdef SAVE_INTERMEDIARY
	#define RENDER_TEMPDIR_NAME string("render")
	#define RENDER_TEMPDIR_SCENE (RENDER_TEMPDIR_NAME+string("/scenetemp.txt"))
#endif
#define USING_BVH

#ifndef NDEBUG
#define DEBUG_CLICK
#define DEBUG_CLICK_INDENT for(int i=0;i<depth;++i){printf("|   ");}
#endif

#if 0
	#define DT_COL float
	#define DT_FP float
	#define MAX_FP MAX_FLOAT
	#define MIN_FP MIN_FLOAT
	#define EPSILON (DT_FP)(0.001)
#else
	#define DT_COL double
	#define DT_FP double
	#define MAX_FP MAX_DOUBLE
	#define MIN_FP MIN_DOUBLE
	#define EPSILON (DT_FP)(0.00001)
#endif

//#define OUTPUT_FRESNEL
//#define OUTPUT_BVH_HEATMAP
//#define OUTPUT_T
//#define OUTPUT_FILM_PATH_LENGTH
#ifdef OUTPUT_FILM_PATH_LENGTH
	#define OUTPUT_FILM_PATH_LENGTH_SCALE 1.0/5000.0
#endif
#ifdef OUTPUT_T
	#define OUTPUT_T_NEAR 1.5
	#define OUTPUT_T_FAR 11.0
#endif
//#define OUTPUT_NORMAL
//#define OUTPUT_REFLECTION
#ifdef OUTPUT_REFLECTION
	#define OUTPUT_REFLECTION_DEPTH 0
#endif
//#define OUTPUT_REFRACTION
#ifdef OUTPUT_REFRACTION
	#define OUTPUT_REFRACTION_DEPTH 0
#endif
#define OUTPUT_ABS
//#define OUTPUT_UV_DIFFUSE

#define ALLOW_AMBIENT
#define ALLOW_DIFFUSE
#define ALLOW_SPECULAR
#define ALLOW_SHADOWS
#define ALLOW_REFLECTIONS
#define ALLOW_REFRACTIONS
#define ALLOW_FILMS
#define ALLOW_BACKGROUND
#define ALLOW_RENDER
#ifndef ALLOW_RENDER
	#define RENDER_TILE_DELAY 100
#endif

#define SAMPLES_SHADOW_DEFAULT 1
#define SAMPLE_TEXTURE_DEFAULT 3
#if SAMPLE_TEXTURE_DEFAULT==1
	#define SAMPLE_TEXTURE_DEFAULT_NEAREST
#elif SAMPLE_TEXTURE_DEFAULT==2
	#define SAMPLE_TEXTURE_DEFAULT_BILINEAR
#elif SAMPLE_TEXTURE_DEFAULT==3
	#define SAMPLE_TEXTURE_DEFAULT_BICUBIC
#elif SAMPLE_TEXTURE_DEFAULT==4
	#define SAMPLE_TEXTURE_DEFAULT_GAUSS
	#define SAMPLES_GAUSS_DEFAULT 4
#endif

#define NUM_RANDOM_DISTR 50 //How many subpixel/aperture sample distributions to generate?
#define NUM_RANDOM_SAMPLES 1000 //The number of samples to generate for the light
#define NUM_POW_TABLE 1000 //How big is the pow cache?

#define MAX_IMAGE_WIDTH 8192
#define MAX_IMAGE_HEIGHT 8192
#define MAX_IMAGE_SAMPLES 65536

#define DEBUG_TOKENS