diff -r f22952603f29 -r 79b516a3803d src/raytracer.h --- a/src/raytracer.h Thu Nov 29 18:30:16 2007 +0100 +++ b/src/raytracer.h Fri Nov 30 00:44:51 2007 +0100 @@ -20,10 +20,7 @@ struct RenderrowData { Raytracer *rt; int w; - Vector3 eye, dfix, dx; -#if OVERSAMPLING - Vector3 dy; -#endif + Vector3 eye, dfix, dx, dy; float *iter; }; @@ -36,11 +33,13 @@ int ao_samples; float ao_distance, ao_angle; int num_threads; + int subsample; + int max_depth; Vector3 SphereDistribute(int i, int n, float extent, Vector3 &normal); public: Raytracer(): top(NULL), camera(NULL), lights(), bg_colour(0.0, 0.0, 0.0), - ao_samples(0), num_threads(4) {}; + ao_samples(0), num_threads(4), subsample(8), max_depth(4) {}; void render(int w, int h, float *buffer); Colour raytrace(Ray &ray, int depth, Shape *origin_shape); void addshape(Shape *shape) { top->addShape(shape); }; @@ -48,6 +47,8 @@ void setCamera(Camera *cam) { camera = cam; }; void setTop(Container *atop) { top = atop; }; Container *getTop() { return top; }; + int getSubsample() { return subsample; }; + void setMaxDepth(int newdepth) { max_depth = newdepth; }; void ambientocclusion(int samples, float distance, float angle); void setThreads(int num) { num_threads = num; };