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.37 by greg, Thu May 18 17:59:37 2017 UTC vs.
Revision 2.38 by greg, Fri May 19 15:13:41 2017 UTC

# Line 114 | Line 114 | compute_through(BSDFDAT *ndp)
114  
115          setcolor(ndp->cthru, .0, .0, .0);       /* starting assumption */
116  
117 +        if (!(ndp->pr->crtype & (SPECULAR|AMBIENT|SHADOW)))
118 +                return;                         /* simply don't need to know */
119 +
120          if (ndp->pr->rod > 0)
121                  dfp = (ndp->sd->tf != NULL) ? ndp->sd->tf : ndp->sd->tb;
122          else
# Line 230 | Line 233 | direct_specular_OK(COLOR cval, FVECT ldir, double omeg
233          if (ec)
234                  goto baderror;
235                                          /* check indirect over-counting */
236 <        if ((ndp->thick != 0 || bright(ndp->cthru) > FTINY)
237 <                                && ndp->pr->crtype & (SPECULAR|AMBIENT)
238 <                                && (vsrc[2] > 0) ^ (ndp->vray[2] > 0)) {
236 >        if (ndp->pr->crtype & (SPECULAR|AMBIENT)
237 >                                && (vsrc[2] > 0) ^ (ndp->vray[2] > 0)
238 >                                && bright(ndp->cthru) > FTINY) {
239                  double  dx = vsrc[0] + ndp->vray[0];
240                  double  dy = vsrc[1] + ndp->vray[1];
241                  if (dx*dx + dy*dy <= (4./PI)*(omega + tomega +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines