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

Comparing ray/src/rt/m_bsdf.c (file contents):
Revision 2.21 by greg, Sat Jun 9 07:16:47 2012 UTC vs.
Revision 2.22 by greg, Sun Sep 2 15:33:15 2012 UTC

# Line 380 | Line 380 | sample_sdf(BSDFDAT *ndp, int sflags)
380  
381          if (sflags == SDsampSpT) {
382                  unsc = ndp->tunsamp;
383 <                dfp = ndp->sd->tf;
383 >                if (ndp->pr->rod > 0)
384 >                        dfp = (ndp->sd->tf != NULL) ? ndp->sd->tf : ndp->sd->tb;
385 >                else
386 >                        dfp = (ndp->sd->tb != NULL) ? ndp->sd->tb : ndp->sd->tf;
387                  cvt_sdcolor(unsc, &ndp->sd->tLamb);
388          } else /* sflags == SDsampSpR */ {
389                  unsc = ndp->runsamp;
# Line 470 | Line 473 | m_bsdf(OBJREC *m, RAY *r)
473          } else {
474                  if (m->oargs.nfargs < 6) {      /* check invisible backside */
475                          if (!backvis && (nd.sd->rb == NULL) &
476 <                                                (nd.sd->tf == NULL)) {
476 >                                        (nd.sd->tb == NULL)) {
477                                  SDfreeCache(nd.sd);
478                                  raytrans(r);
479                                  return(1);
# Line 567 | Line 570 | m_bsdf(OBJREC *m, RAY *r)
570                          flipsurface(r);
571          }
572                                                  /* add direct component */
573 <        if ((bright(nd.tdiff) <= FTINY) & (nd.sd->tf == NULL)) {
573 >        if ((bright(nd.tdiff) <= FTINY) & (nd.sd->tf == NULL) &
574 >                                        (nd.sd->tb == NULL)) {
575                  direct(r, dir_brdf, &nd);       /* reflection only */
576          } else if (nd.thick == 0) {
577                  direct(r, dir_bsdf, &nd);       /* thin surface scattering */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines