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

Comparing ray/src/rt/source.c (file contents):
Revision 2.73 by greg, Fri Jul 3 00:42:20 2020 UTC vs.
Revision 2.74 by greg, Thu Dec 17 03:30:37 2020 UTC

# Line 477 | Line 477 | direct(                                        /* add direct component */
477                                                  /* compute number to check */
478          nshadcheck = pow((double)ncnts, shadcert) + .5;
479                                                  /* modify threshold */
480 <        if (ncnts > MINSHADCNT)
481 <                ourthresh = shadthresh / r->rweight;
482 <        else
483 <                ourthresh = 0;
480 >        ourthresh = shadthresh / r->rweight;
481                                                  /* test for shadows */
482          for (nhits = 0, hwt = 0.0, sn = 0; sn < ncnts;
483                          hwt += (double)source[scp->sno].nhits /
484                                  (double)source[scp->sno].ntests,
485                          sn++) {
486                                                  /* check threshold */
487 <                if ((sn+nshadcheck>=ncnts ? cntord[sn].brt :
487 >                if (sn >= MINSHADCNT &&
488 >                            (sn+nshadcheck>=ncnts ? cntord[sn].brt :
489                                  cntord[sn].brt-cntord[sn+nshadcheck].brt)
490 <                                < ourthresh*bright(r->rcol))
490 >                                        < ourthresh*bright(r->rcol))
491                          break;
492                  scp = srccnt + cntord[sn].sndx;
493                                                  /* test for hit */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines