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.3 by greg, Sat Jun 8 21:16:04 1996 UTC vs.
Revision 2.4 by gregl, Mon Oct 20 17:18:42 1997 UTC

# Line 366 | Line 366 | int    x0, xsiz, y0, ysiz;             /* origin and size of subimag
366          int     nsv, npv;
367          int     xmin, xmax, ymin, ymax, x, y;
368          FLOAT   cxy[2];
369 <        double  pa;
369 >        double  w;
370          RAY     sr;
371          register SPLIST *sp;
372          register int    i;
# Line 415 | Line 415 | int    x0, xsiz, y0, ysiz;             /* origin and size of subimag
415                                          continue;       /* missed/blocked */
416                                                          /* modify pixel */
417                                  if (zbf[y-y0] != NULL &&
418 <                                                sr.rt < zbf[y-y0][x-x0])
418 >                                                sr.rt < 0.999*zbf[y-y0][x-x0])
419                                          zbf[y-y0][x-x0] = sr.rt;
420 <                                pa = poly_area(ppoly, npv);
421 <                                scalecolor(sr.rcol, pa*hres*vres);
422 <                                scalecolor(pic[y-y0][x-x0], (1.-pa*hres*vres));
420 >                                else if (!bigdiff(sr.rcol, pic[y-y0][x-x0],
421 >                                                0.001)) /* source sample */
422 >                                        setcolor(pic[y-y0][x-x0], 0., 0., 0.);
423 >                                w = poly_area(ppoly, npv) * hres * vres;
424 >                                scalecolor(sr.rcol, w);
425 >                                scalecolor(pic[y-y0][x-x0], 1.-w);
426                                  addcolor(pic[y-y0][x-x0], sr.rcol);
427                          }
428          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines