--- ray/src/rt/rcmain.c 2012/06/11 05:07:55 2.3 +++ ray/src/rt/rcmain.c 2012/06/22 22:03:02 2.7 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcmain.c,v 2.3 2012/06/11 05:07:55 greg Exp $"; +static const char RCSid[] = "$Id: rcmain.c,v 2.7 2012/06/22 22:03:02 greg Exp $"; #endif /* * rcmain.c - main for rtcontrib ray contribution tracer @@ -9,8 +9,7 @@ static const char RCSid[] = "$Id: rcmain.c,v 2.3 2012/ #include #include "rcontrib.h" -#include "platform.h" -#include "paths.h" +#include "random.h" #include "source.h" #include "ambient.h" @@ -44,11 +43,11 @@ int lim_dist = 0; /* limit distance? */ const char *modname[MAXMODLIST]; /* ordered modifier name list */ int nmods = 0; /* number of modifiers */ +void (*addobjnotify[8])() = {ambnotify, NULL}; + char RCCONTEXT[] = "RCONTRIB"; /* our special evaluation context */ -void (*addobjnotify[8])() = {ambnotify, tranotify, NULL}; - static void printdefaults(void) /* print default values to stdout */ { @@ -170,7 +169,6 @@ main(int argc, char *argv[]) case 'n': case 'N': case 'f': case 'F': \ case '-': case '0': var = 0; break; \ default: goto badopt; } - int nprocs = 1; char *curout = NULL; char *binval = NULL; int bincnt = 0; @@ -337,6 +335,8 @@ main(int argc, char *argv[]) nsceneobjs = nobjects; marksources(); /* find and mark sources */ + for (i = 0; i < nsources; i++) /* tracing to sources as well */ + source[i].sflags |= SFOLLOW; setambient(); /* initialize ambient calculation */