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.19 by greg, Fri Dec 8 18:22:28 1995 UTC vs.
Revision 2.20 by greg, Sat Dec 9 11:30:19 1995 UTC

# Line 374 | Line 374 | char  *p;                      /* data for f */
374   srcscatter(r)                   /* compute source scattering into ray */
375   register RAY  *r;
376   {
377 +        int  oldsampndx;
378          int  nsamps;
379          RAY  sr;
380          SRCINDEX  si;
# Line 385 | Line 386 | register RAY  *r;
386                  return;
387          if (ssampdist <= FTINY || (nsamps = r->rot/ssampdist + .5) < 1)
388                  nsamps = 1;
389 +        oldsampndx = samplendx;
390 +        samplendx = random()&0x7fff;            /* randomize */
391          initsrcindex(&si);
392          for (i = r->slights[0]; i > 0; i--) {   /* for each source */
393                  setcolor(cumval, 0., 0., 0.);
# Line 438 | Line 441 | register RAY  *r;
441                  multcolor(cumval, ctmp);
442                  addcolor(r->rcol, cumval);      /* sum into ray result */
443          }
444 +        samplendx = oldsampndx;
445   }
446  
447  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines