--- ray/src/gen/mkillum2.c 2009/09/08 23:05:47 2.33 +++ ray/src/gen/mkillum2.c 2009/09/09 15:32:20 2.34 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: mkillum2.c,v 2.33 2009/09/08 23:05:47 greg Exp $"; +static const char RCSid[] = "$Id: mkillum2.c,v 2.34 2009/09/09 15:32:20 greg Exp $"; #endif /* * Routines to do the actual calculation for mkillum @@ -752,7 +752,7 @@ redistribute( /* pass distarr ray sums through BSDF * if (o == direct_out) addcolor(col, cdir); /* minus direct */ scalecolor(col, wt); - cp = &distarr[3*o]; + cp = &distarr[3*(k*nazi + j)]; addcolor(cp, col); /* sum into distribution */ } }