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 1.33 by greg, Wed Jun 19 16:36:44 1991 UTC vs.
Revision 1.34 by greg, Thu Jun 20 09:03:57 1991 UTC

# Line 338 | Line 338 | char  *p;                      /* data for f */
338          register int  sn;
339          int  nshadcheck, ncnts;
340          int  nhits;
341 <        double  prob, ourthresh, hwt;
341 >        double  dom, prob, ourthresh, hwt;
342          RAY  sr;
343                          /* NOTE: srccnt and cntord global so no recursion */
344          if (nsources <= 0)
# Line 352 | Line 352 | char  *p;                      /* data for f */
352                  cntord[sn].sno = sn;
353                  cntord[sn].brt = 0.0;
354                                                  /* get source ray */
355 <                if ((srccnt[sn].dom = srcray(&sr, r, sn)) == 0.0)
355 >                if ((dom = srcray(&sr, r, sn)) == 0.0)
356                          continue;
357                  VCOPY(srccnt[sn].dir, sr.rdir);
358                                                  /* compute coefficient */
359 <                (*f)(srccnt[sn].val, p, srccnt[sn].dir, srccnt[sn].dom);
360 <                cntord[sn].brt = bright(srccnt[sn].val);
359 >                (*f)(srccnt[sn].coef, p, srccnt[sn].dir, dom);
360 >                cntord[sn].brt = bright(srccnt[sn].coef);
361                  if (cntord[sn].brt <= 0.0)
362                          continue;
363                                                  /* compute contribution */
364                  srcvalue(&sr);
365 <                multcolor(srccnt[sn].val, sr.rcol);
365 >                copycolor(srccnt[sn].val, sr.rcol);
366 >                multcolor(srccnt[sn].val, srccnt[sn].coef);
367                  cntord[sn].brt = bright(srccnt[sn].val);
368          }
369                                                  /* sort contributions */
# Line 403 | Line 404 | char  *p;                      /* data for f */
404                          raycont(&sr);
405                          if (bright(sr.rcol) <= FTINY)
406                                  continue;       /* missed! */
407 <                        (*f)(srccnt[cntord[sn].sno].val, p,
408 <                                        srccnt[cntord[sn].sno].dir,
409 <                                        srccnt[cntord[sn].sno].dom);
409 <                        multcolor(srccnt[cntord[sn].sno].val, sr.rcol);
407 >                        copycolor(srccnt[cntord[sn].sno].val, sr.rcol);
408 >                        multcolor(srccnt[cntord[sn].sno].val,
409 >                                        srccnt[cntord[sn].sno].coef);
410                  }
411                                                  /* add contribution if hit */
412                  addcolor(r->rcol, srccnt[cntord[sn].sno].val);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines