--- ray/src/rt/raytrace.c 2005/08/22 21:54:41 2.56 +++ ray/src/rt/raytrace.c 2006/06/07 17:52:04 2.58 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: raytrace.c,v 2.56 2005/08/22 21:54:41 greg Exp $"; +static const char RCSid[] = "$Id: raytrace.c,v 2.58 2006/06/07 17:52:04 schorsch Exp $"; #endif /* * raytrace.c - routines for tracing and shading rays. @@ -23,7 +23,7 @@ unsigned long nrays = 0; /* number of calls to local static RREAL Lambfa[5] = {PI, PI, PI, 0.0, 0.0}; OBJREC Lamb = { OVOID, MAT_PLASTIC, "Lambertian", - {0, 5, NULL, Lambfa}, NULL, + {NULL, Lambfa, 0, 5}, NULL }; /* a Lambertian surface */ OBJREC Aftplane; /* aft clipping plane object */ @@ -93,11 +93,13 @@ rayorigin( /* start new ray from old one */ colval(ro->cext,RED) : colval(ro->cext,GRN); if (colval(ro->cext,BLU) < re) re = colval(ro->cext,BLU); re *= ro->rot; - if (re > 0.1) - if (re > 92.) + if (re > 0.1) { + if (re > 92.) { r->rweight = 0.0; - else + } else { r->rweight *= exp(-re); + } + } } rayclear(r); if (r->rweight <= 0.0) /* check for expiration */