--- ray/src/rt/raytrace.c 1989/05/07 17:50:51 1.4 +++ ray/src/rt/raytrace.c 1989/11/29 14:35:25 1.7 @@ -22,7 +22,7 @@ extern double minweight; /* minimum ray weight */ long nrays = 0L; /* number of rays traced */ -#define MAXLOOP 1024 /* modifier loop detection */ +#define MAXLOOP 128 /* modifier loop detection */ #define RAYHIT (-1) /* return value for intercepted ray */ @@ -68,13 +68,12 @@ register RAY *r; { extern int (*trace)(); - if (localhit(r, &thescene)) + if (localhit(r, &thescene) || sourcehit(r)) + /* check for clipped object */ if (r->clipset != NULL && inset(r->clipset, r->ro->omod)) - raytrans(r); /* object is clipped */ + raytrans(r); else rayshade(r, r->ro->omod); - else if (sourcehit(r)) - rayshade(r, r->ro->omod); if (trace != NULL) (*trace)(r); /* trace execution */