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.61 by greg, Thu Jul 9 17:32:31 2020 UTC vs.
Revision 2.62 by greg, Sat Mar 27 17:50:18 2021 UTC

# Line 195 | Line 195 | compute_through(BSDFDAT *ndp)
195          }
196          if (vypeak*tomsurr < peak_over*bright(vsurr)*ns)
197                  return;                         /* peak not peaky enough */
198 <        if ((vypeak/ns - ndp->sd->tLamb.cieY*(1./PI))*tomsum <= .001)
198 >        if ((vypeak/ns - (ndp->vray[2] > 0 ? ndp->sd->tLambFront.cieY
199 >                        : ndp->sd->tLambBack.cieY)*(1./PI))*tomsum <= .001)
200                  return;                         /* < 0.1% transmission */
201          copycolor(ndp->cthru, vpeak);           /* already scaled by omega */
202          multcolor(ndp->cthru, ndp->pr->pcol);   /* modify by pattern */
# Line 255 | Line 256 | direct_specular_OK(COLOR cval, FVECT ldir, double omeg
256                          return(0);      /* all diffuse */
257                  sv = ndp->sd->rLambBack;
258                  break;
259 <        default:
259 >        case 1:
260                  if ((ndp->sd->tf == NULL) & (ndp->sd->tb == NULL))
261                          return(0);      /* all diffuse */
262 <                sv = ndp->sd->tLamb;
262 >                sv = ndp->sd->tLambFront;
263                  break;
264 +        case 2:
265 +                if ((ndp->sd->tf == NULL) & (ndp->sd->tb == NULL))
266 +                        return(0);      /* all diffuse */
267 +                sv = ndp->sd->tLambBack;
268 +                break;
269          }
270          if (sv.cieY > FTINY) {
271                  diffY = sv.cieY *= 1./PI;
# Line 696 | Line 702 | m_bsdf(OBJREC *m, RAY *r)
702                  }
703          }
704                                                  /* diffuse transmittance */
705 <        cvt_sdcolor(nd.tdiff, &nd.sd->tLamb);
705 >        cvt_sdcolor(nd.tdiff, hitfront ? &nd.sd->tLambFront : &nd.sd->tLambBack);
706          if (m->oargs.nfargs >= 9) {
707                  setcolor(ctmp, m->oargs.farg[6],
708                                  m->oargs.farg[7],

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines