--- ray/src/rt/source.c 1989/07/20 13:51:34 1.15 +++ ray/src/rt/source.c 1989/11/29 14:35:27 1.18 @@ -379,7 +379,10 @@ char *p; /* data for f */ if (localhit(&sr, &thescene) && sr.ro != source[cntord[sn].sno].so) { /* check for transmission */ - rayshade(&sr, sr.ro->omod); + if (sr.clipset != NULL && inset(sr.clipset, sr.ro->omod)) + raytrans(&sr); + else + rayshade(&sr, sr.ro->omod); if (bright(sr.rcol) <= FTINY) continue; /* missed! */ (*f)(srccnt[cntord[sn].sno].val, p, @@ -394,7 +397,7 @@ char *p; /* data for f */ } /* weighted hit rate */ hwt = hit2 / test2; -#ifdef DEBUG +#ifdef notdef sprintf(errmsg, "%d tested, %d untested, %f hit rate\n", sn, ncnts-sn, hwt); eputs(errmsg); @@ -428,9 +431,6 @@ m_light(m, r) /* ray hit a light source */ register OBJREC *m; register RAY *r; { - /* check for behind */ - if (r->rod < 0.0) - return; /* check for over-counting */ if (wrongsource(m, r) || badambient(m, r)) return; @@ -444,6 +444,9 @@ register RAY *r; /* otherwise treat as source */ } else { + /* check for behind */ + if (r->rod < 0.0) + return; /* get distribution pattern */ raytexture(r, m->omod); /* get source color */