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.13 by greg, Thu Sep 2 16:02:56 2004 UTC vs.
Revision 2.15 by greg, Tue Oct 26 19:04:32 2004 UTC

# Line 11 | Line 11 | static const char      RCSid[] = "$Id$";
11  
12   #include  "ray.h"
13   #include  "view.h"
14 + #include  "otypes.h"
15   #include  "source.h"
16  
17  
# Line 373 | Line 374 | init_drawsources(
374          }
375                                          /* loop through all sources */
376          for (i = nsources; i--; ) {
377 +                                        /* skip illum's */
378 +                if (findmaterial(source[i].so)->otype == MAT_ILLUM)
379 +                        continue;
380                                          /* compute image polygon for source */
381                  if (!(nsv = sourcepoly(i, spoly)))
382                          continue;
# Line 444 | Line 448 | drawsources(
448                                  if (source[sp->sn].sflags & SSPOT &&
449                                                  spotout(&sr, source[sp->sn].sl.s))
450                                          continue;       /* outside spot */
451 <                                w = poly_area(ppoly, npv) * hres * vres;
452 <                                if (w < .95) {          /* subpixel source */
449 <                                        rayorigin(&sr, NULL, SHADOW, 1.0);
450 <                                        sr.rsrc = sp->sn;
451 <                                } else
452 <                                        rayorigin(&sr, NULL, PRIMARY, 1.0);
451 >                                rayorigin(&sr, NULL, SHADOW, 1.0);
452 >                                sr.rsrc = sp->sn;
453                                  rayvalue(&sr);          /* compute value */
454                                  if (bright(sr.rcol) <= FTINY)
455                                          continue;       /* missed/blocked */
456                                                          /* modify pixel */
457 +                                w = poly_area(ppoly, npv) * hres * vres;
458                                  if (zbf[y-y0] != NULL &&
459                                                  sr.rt < 0.99*zbf[y-y0][x-x0]) {
460                                          zbf[y-y0][x-x0] = sr.rt;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines