--- ray/src/util/rttree_reduce.c 2011/08/20 02:46:13 2.5 +++ ray/src/util/rttree_reduce.c 2011/11/21 20:07:50 2.6 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rttree_reduce.c,v 2.5 2011/08/20 02:46:13 greg Exp $"; +static const char RCSid[] = "$Id: rttree_reduce.c,v 2.6 2011/11/21 20:07:50 greg Exp $"; #endif /* * A utility called by genBSDF.pl to reduce tensor tree samples and output @@ -291,17 +291,49 @@ load_data() error(WARNING, "binary data past end of expected input"); } +/* Enforce reciprocity by averaging data values */ +static void +do_reciprocity() +{ + float *v1p, *v2p; + + if (ttrank == 3) { + int ix, ox, oy; + for (ix = 0; ix < 1<<(log2g-1); ix++) + for (ox = 0; ox < 1<