--- ray/src/rt/rcontrib.c 2012/06/27 15:32:58 2.14 +++ ray/src/rt/rcontrib.c 2012/08/14 22:25:12 2.16 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcontrib.c,v 2.14 2012/06/27 15:32:58 greg Exp $"; +static const char RCSid[] = "$Id: rcontrib.c,v 2.16 2012/08/14 22:25:12 greg Exp $"; #endif /* * Accumulate ray contributions for a set of materials @@ -255,8 +255,10 @@ eval_irrad(FVECT org, FVECT dir) thisray.rdir[2] = -dir[2]; thisray.rmax = 0.0; rayorigin(&thisray, PRIMARY, NULL, NULL); - thisray.rot = 1e-5; /* pretend we hit surface */ + /* pretend we hit surface */ + thisray.rt = thisray.rot = 1e-5; thisray.rod = 1.0; + VCOPY(thisray.ron, dir); VSUM(thisray.rop, org, dir, 1e-4); samplendx++; /* compute result */ (*ofun[Lamb.otype].funp)(&Lamb, &thisray);