ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/raycalls.c
(Generate patch)

Comparing ray/src/rt/raycalls.c (file contents):
Revision 2.23 by greg, Tue Jan 23 23:37:11 2018 UTC vs.
Revision 2.24 by greg, Thu Apr 18 23:58:22 2019 UTC

# Line 121 | Line 121 | void   (*addobjnotify[8])() = {ambnotify, NULL};
121  
122   int     do_irrad = 0;                   /* compute irradiance? */
123  
124 < int     rand_samp = 0;                  /* pure Monte Carlo sampling? */
124 > int     rand_samp = 1;                  /* pure Monte Carlo sampling? */
125  
126   double  dstrsrc = 0.0;                  /* square source distribution */
127   double  shadthresh = .03;               /* shadow threshold */
# Line 141 | Line 141 | double specjitter = 1.;                /* specular sampling jitter *
141  
142   int     backvis = 1;                    /* back face visibility */
143  
144 < int     maxdepth = 8;                   /* maximum recursion depth */
145 < double  minweight = 5e-4;               /* minimum ray weight */
144 > int     maxdepth = -10;                 /* maximum recursion depth */
145 > double  minweight = 2e-3;               /* minimum ray weight */
146  
147   char    *ambfile = NULL;                /* ambient file name */
148   COLOR   ambval = BLKCOLOR;              /* ambient value */
# Line 238 | Line 238 | ray_save(                      /* save current parameter settings */
238          if (rp == NULL)
239                  return;
240          rp->do_irrad = do_irrad;
241 +        rp->rand_samp = rand_samp;
242          rp->dstrsrc = dstrsrc;
243          rp->shadthresh = shadthresh;
244          rp->shadcert = shadcert;
# Line 254 | Line 255 | ray_save(                      /* save current parameter settings */
255          rp->backvis = backvis;
256          rp->maxdepth = maxdepth;
257          rp->minweight = minweight;
257        copycolor(rp->ambval, ambval);
258        memset(rp->ambfile, '\0', sizeof(rp->ambfile));
258          if (ambfile != NULL)
259                  strncpy(rp->ambfile, ambfile, sizeof(rp->ambfile)-1);
260 +        else
261 +                memset(rp->ambfile, '\0', sizeof(rp->ambfile));
262 +        copycolor(rp->ambval, ambval);
263          rp->ambvwt = ambvwt;
264          rp->ambacc = ambacc;
265          rp->ambres = ambres;
# Line 298 | Line 300 | ray_restore(                   /* restore parameter settings */
300          }
301                                          /* restore saved settings */
302          do_irrad = rp->do_irrad;
303 +        rand_samp = rp->rand_samp;
304          dstrsrc = rp->dstrsrc;
305          shadthresh = rp->shadthresh;
306          shadcert = rp->shadcert;
# Line 365 | Line 368 | ray_defaults(          /* get default parameter values */
368                  return;
369  
370          rp->do_irrad = 0;
371 +        rp->rand_samp = 1;
372          rp->dstrsrc = 0.0;
373          rp->shadthresh = .03;
374          rp->shadcert = .75;
# Line 379 | Line 383 | ray_defaults(          /* get default parameter values */
383          rp->specthresh = .15;
384          rp->specjitter = 1.;
385          rp->backvis = 1;
386 <        rp->maxdepth = 8;
386 >        rp->maxdepth = -10;
387          rp->minweight = 2e-3;
384        setcolor(rp->ambval, 0., 0., 0.);
388          memset(rp->ambfile, '\0', sizeof(rp->ambfile));
389 +        setcolor(rp->ambval, 0., 0., 0.);
390          rp->ambvwt = 0;
391          rp->ambres = 256;
392          rp->ambacc = 0.15;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines