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.44 by schorsch, Tue Mar 30 16:13:01 2004 UTC vs.
Revision 2.46 by greg, Wed Sep 8 17:10:16 2004 UTC

# Line 125 | Line 125 | marksources(void)                      /* find and mark source objects */
125                          }
126                  }
127   #if  SHADCACHE
128 <                source[ns].obscache = NULL;
128 >                initobscache(ns);
129   #endif
130                  if (!(source[ns].sflags & SSKIP))
131                          foundsource++;
# Line 499 | Line 499 | srcscatter(                    /* compute source scattering into ray */
499                          if (!srcray(&sr, NULL, &si) ||
500                                          sr.rsrc != r->slights[i])
501                                  continue;               /* no path */
502 + #if SHADCACHE
503 +                        if (srcblocked(&sr))            /* check shadow cache */
504 +                                continue;
505 + #endif
506                          copycolor(sr.cext, r->cext);
507                          copycolor(sr.albedo, r->albedo);
508                          sr.gecc = r->gecc;
509                          sr.slights = r->slights;
510                          rayvalue(&sr);                  /* eval. source ray */
511 <                        if (bright(sr.rcol) <= FTINY)
511 >                        if (bright(sr.rcol) <= FTINY) {
512 > #if SHADCACHE
513 >                                srcblocker(&sr);        /* add blocker to cache */
514 > #endif
515                                  continue;
516 +                        }
517                          if (r->gecc <= FTINY)           /* compute P(theta) */
518                                  d = 1.;
519                          else {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines