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.14 by greg, Wed Jul 19 18:47:01 1989 UTC vs.
Revision 1.18 by greg, Wed Nov 29 14:35:27 1989 UTC

# Line 329 | Line 329 | char  *p;                      /* data for f */
329                                                  /* compute coefficient */
330                  (*f)(srccnt[sn].val, p, srccnt[sn].dir, srccnt[sn].dom);
331                  cntord[sn].brt = bright(srccnt[sn].val);
332 <                if (cntord[sn].brt <= FTINY)
332 >                if (cntord[sn].brt <= 0.0)
333                          continue;
334                                                  /* compute intersection */
335                  if (!( source[sn].sflags & SDISTANT ?
# Line 379 | Line 379 | char  *p;                      /* data for f */
379                  if (localhit(&sr, &thescene) &&
380                                  sr.ro != source[cntord[sn].sno].so) {
381                                                  /* check for transmission */
382 <                        rayshade(&sr, sr.ro->omod);
382 >                        if (sr.clipset != NULL && inset(sr.clipset, sr.ro->omod))
383 >                                raytrans(&sr);
384 >                        else
385 >                                rayshade(&sr, sr.ro->omod);
386                          if (bright(sr.rcol) <= FTINY)
387                                  continue;       /* missed! */
388                          (*f)(srccnt[cntord[sn].sno].val, p,
# Line 394 | Line 397 | char  *p;                      /* data for f */
397          }
398                                          /* weighted hit rate */
399          hwt = hit2 / test2;
400 < #ifdef DEBUG
400 > #ifdef notdef
401          sprintf(errmsg, "%d tested, %d untested, %f hit rate\n",
402                          sn, ncnts-sn, hwt);
403          eputs(errmsg);
# Line 428 | Line 431 | m_light(m, r)                  /* ray hit a light source */
431   register OBJREC  *m;
432   register RAY  *r;
433   {
431                                                /* check for behind */
432        if (r->rod < 0.0)
433                return;
434                                                  /* check for over-counting */
435          if (wrongsource(m, r) || badambient(m, r))
436                  return;
# Line 444 | Line 444 | register RAY  *r;
444  
445                                                  /* otherwise treat as source */
446          } else {
447 +                                                /* check for behind */
448 +                if (r->rod < 0.0)
449 +                        return;
450                                                  /* get distribution pattern */
451                  raytexture(r, m->omod);
452                                                  /* get source color */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines