ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/mkillum2.c
(Generate patch)

Comparing ray/src/gen/mkillum2.c (file contents):
Revision 2.32 by greg, Thu Jul 2 04:26:41 2009 UTC vs.
Revision 2.33 by greg, Tue Sep 8 23:05:47 2009 UTC

# Line 725 | Line 725 | redistribute(          /* pass distarr ray sums through BSDF *
725                          cp = &direct_discount[3*i];
726                          copycolor(cdir, cp);
727                          scalecolor(cdir, -wt);
728 <                        direct_out = flatindex(dv, nalt, nazi);
728 >                        if (b->nout != b->ninc)
729 >                                direct_out = flatindex(dv, nalt, nazi);
730 >                        else
731 >                                direct_out = i; /* assumes dist. mirroring */
732                  }
733                  for (k = nalt; k--; )           /* loop over distribution */
734                    for (j = nazi; j--; ) {
# Line 744 | Line 747 | redistribute(          /* pass distarr ray sums through BSDF *
747                          }
748                          wt = BSDF_value(b, i, o) * (1./NBSDFSAMPS);
749                          copycolor(col, cinc);
750 <                        o = k*nazi + j;
750 >                        if (b->nout != b->ninc)
751 >                                o = k*nazi + j;
752                          if (o == direct_out)
753                                  addcolor(col, cdir);    /* minus direct */
754                          scalecolor(col, wt);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines