--- ray/src/rt/source.c 1989/07/20 13:51:34 1.15 +++ ray/src/rt/source.c 1989/09/29 10:04:01 1.17 @@ -394,7 +394,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 +428,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 +441,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 */