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.32 by greg, Sat Feb 18 19:12:49 2017 UTC vs.
Revision 2.33 by greg, Sun Feb 19 17:22:18 2017 UTC

# Line 93 | Line 93 | bsdf_jitter(FVECT vres, BSDFDAT *ndp, double sr_psa)
93          normalize(vres);
94   }
95  
96 < /* Evaluate BSDF for direct component, returning true if OK to proceed */
96 > /* Get BSDF specular for direct component, returning true if OK to proceed */
97   static int
98 < direct_bsdf_OK(COLOR cval, FVECT ldir, double omega, BSDFDAT *ndp)
98 > direct_specular_OK(COLOR cval, FVECT ldir, double omega, BSDFDAT *ndp)
99   {
100          int     nsamp, ok = 0;
101          FVECT   vsrc, vsmp, vjit;
# Line 127 | Line 127 | direct_bsdf_OK(COLOR cval, FVECT ldir, double omega, B
127                  sv = ndp->sd->tLamb;
128                  break;
129          }
130 <        if ((sv.cieY *= 1./PI) > FTINY) {
131 <                diffY = sv.cieY;
130 >        if (sv.cieY > FTINY) {
131 >                diffY = sv.cieY *= 1./PI;
132                  cvt_sdcolor(cdiff, &sv);
133          } else {
134                  diffY = .0;
# Line 238 | Line 238 | dir_bsdf(
238          if (ambRayInPmap(np->pr))
239                  return;         /* specular already in photon map */
240          /*
241 <         *  Compute scattering coefficient using BSDF.
241 >         *  Compute specular scattering coefficient using BSDF.
242           */
243 <        if (!direct_bsdf_OK(ctmp, ldir, omega, np))
243 >        if (!direct_specular_OK(ctmp, ldir, omega, np))
244                  return;
245          if (ldot < 0) {         /* pattern for specular transmission */
246                  multcolor(ctmp, np->pr->pcol);
# Line 284 | Line 284 | dir_brdf(
284          if (ambRayInPmap(np->pr))
285                  return;         /* specular already in photon map */
286          /*
287 <         *  Compute reflection coefficient using BSDF.
287 >         *  Compute specular reflection coefficient using BSDF.
288           */
289 <        if (!direct_bsdf_OK(ctmp, ldir, omega, np))
289 >        if (!direct_specular_OK(ctmp, ldir, omega, np))
290                  return;
291          dtmp = ldot * omega;
292          scalecolor(ctmp, dtmp);
# Line 326 | Line 326 | dir_btdf(
326          if (ambRayInPmap(np->pr))
327                  return;         /* specular already in photon map */
328          /*
329 <         *  Compute scattering coefficient using BSDF.
329 >         *  Compute specular scattering coefficient using BSDF.
330           */
331 <        if (!direct_bsdf_OK(ctmp, ldir, omega, np))
331 >        if (!direct_specular_OK(ctmp, ldir, omega, np))
332                  return;
333                                          /* full pattern on transmission */
334          multcolor(ctmp, np->pr->pcol);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines