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

Comparing ray/src/rt/srcdraw.c (file contents):
Revision 2.11 by schorsch, Tue Mar 30 16:13:01 2004 UTC vs.
Revision 2.12 by greg, Thu Sep 2 04:16:58 2004 UTC

# Line 299 | Line 299 | sourcepoly(                    /* compute image polygon for source */
299          register int    i, j;
300  
301          if (s->sflags & (SDISTANT|SFLAT)) {
302 <                if (s->sflags & SDISTANT && ourview.type == VT_PAR)
303 <                        return(0);              /* all or nothing case */
302 >                if (s->sflags & SDISTANT) {
303 >                        if (ourview.type == VT_PAR)
304 >                                return(0);      /* all or nothing case */
305 >                        if (s->srad >= 0.05)
306 >                                return(0);      /* should never be a problem */
307 >                }
308                  if (s->sflags & SFLAT) {
309                          for (i = 0; i < 3; i++)
310                                  ap[i] = s->sloc[i] - ourview.vp[i];
# Line 455 | Line 459 | drawsources(
459                                          zbf[y-y0][x-x0] = sr.rt;
460                                  else if (!bigdiff(sr.rcol, pic[y-y0][x-x0],
461                                                  0.01))  /* source sample */
462 <                                        setcolor(pic[y-y0][x-x0], 0., 0., 0.);
463 <                                scalecolor(sr.rcol, w);
464 <                                scalecolor(pic[y-y0][x-x0], 1.-w);
465 <                                addcolor(pic[y-y0][x-x0], sr.rcol);
462 >                                        scalecolor(pic[y-y0][x-x0], w);
463 >                                else {
464 >                                        scalecolor(sr.rcol, w);
465 >                                        scalecolor(pic[y-y0][x-x0], 1.-w);
466 >                                        addcolor(pic[y-y0][x-x0], sr.rcol);
467 >                                }
468                          }
469          }
470   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines