--- ray/src/rt/rview.c 1991/06/19 16:36:39 1.16 +++ ray/src/rt/rview.c 1991/11/12 17:08:43 2.1 @@ -34,6 +34,9 @@ double dstrsrc = 0.0; /* square source distribution double shadthresh = .1; /* shadow threshold */ double shadcert = .25; /* shadow certainty */ int directrelay = 0; /* number of source relays */ +int vspretest = 128; /* virtual source pretest density */ +int directinvis = 0; /* sources invisible? */ +double srcsizerat = 0.; /* maximum ratio source size/dist. */ int maxdepth = 4; /* maximum recursion depth */ double minweight = 1e-2; /* minimum ray weight */ @@ -60,7 +63,7 @@ int pdepth; /* image depth in current frame */ static char *reserve_mem = NULL; /* pre-allocated reserve memory */ -#define RESERVE_AMT 8192 /* amount of memory to reserve */ +#define RESERVE_AMT 32768 /* amount of memory to reserve */ #define CTRL(c) ('c'-'@') @@ -314,7 +317,7 @@ rsample() /* sample the image */ /* sample the image */ for (y = 0; /* y < ysiz */ ; y++) { for (x = 0; x < xsiz-1; x++) { - if (dev->inpready) + if (dev->inpready || errno == ENOMEM) goto escape; /* * Test super-pixel to the right. @@ -330,7 +333,7 @@ rsample() /* sample the image */ if (y >= ysiz-1) break; for (x = 0; x < xsiz; x++) { - if (dev->inpready) + if (dev->inpready || errno == ENOMEM) goto escape; /* * Find super-pixel at this position in next row. @@ -385,7 +388,7 @@ int pd; if (p->kid == NULL) { /* subdivide */ if ((p->kid = newptree()) == NULL) - return(growth); + return(0); /* * The following paint order can leave a black pixel * when redraw() is called in (*dev->paintr)().