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.13 by greg, Thu Sep 2 16:02:56 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 451 | Line 455 | drawsources(
455                                          continue;       /* missed/blocked */
456                                                          /* modify pixel */
457                                  if (zbf[y-y0] != NULL &&
458 <                                                sr.rt < 0.99*zbf[y-y0][x-x0])
458 >                                                sr.rt < 0.99*zbf[y-y0][x-x0]) {
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.);
460 >                                } else if (!bigdiff(sr.rcol, pic[y-y0][x-x0],
461 >                                                0.01)) { /* source sample */
462 >                                        scalecolor(pic[y-y0][x-x0], w);
463 >                                        continue;
464 >                                }
465                                  scalecolor(sr.rcol, w);
466                                  scalecolor(pic[y-y0][x-x0], 1.-w);
467                                  addcolor(pic[y-y0][x-x0], sr.rcol);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines