--- ray/src/rt/srcdraw.c 2004/10/20 18:19:22 2.14 +++ ray/src/rt/srcdraw.c 2004/10/26 19:04:32 2.15 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: srcdraw.c,v 2.14 2004/10/20 18:19:22 greg Exp $"; +static const char RCSid[] = "$Id: srcdraw.c,v 2.15 2004/10/26 19:04:32 greg Exp $"; #endif /* * Draw small sources into image in case we missed them. @@ -11,6 +11,7 @@ static const char RCSid[] = "$Id: srcdraw.c,v 2.14 200 #include "ray.h" #include "view.h" +#include "otypes.h" #include "source.h" @@ -373,6 +374,9 @@ init_drawsources( } /* loop through all sources */ for (i = nsources; i--; ) { + /* skip illum's */ + if (findmaterial(source[i].so)->otype == MAT_ILLUM) + continue; /* compute image polygon for source */ if (!(nsv = sourcepoly(i, spoly))) continue; @@ -444,7 +448,8 @@ drawsources( if (source[sp->sn].sflags & SSPOT && spotout(&sr, source[sp->sn].sl.s)) continue; /* outside spot */ - rayorigin(&sr, NULL, PRIMARY, 1.0); + rayorigin(&sr, NULL, SHADOW, 1.0); + sr.rsrc = sp->sn; rayvalue(&sr); /* compute value */ if (bright(sr.rcol) <= FTINY) continue; /* missed/blocked */