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.52 by greg, Tue Jun 26 14:42:18 2018 UTC vs.
Revision 2.53 by greg, Thu Aug 2 22:44:35 2018 UTC

# Line 236 | Line 236 | direct_specular_OK(COLOR cval, FVECT ldir, double omeg
236                  diffY = 0;
237                  setcolor(cdiff,  0, 0, 0);
238          }
239 <                                        /* need projected solid angles */
239 >                                        /* need projected solid angle */
240          omega *= fabs(vsrc[2]);
241        ec = SDsizeBSDF(&tomega, ndp->vray, vsrc, SDqueryMin, ndp->sd);
242        if (ec)
243                goto baderror;
241                                          /* check indirect over-counting */
242          if ((vsrc[2] > 0) ^ (ndp->vray[2] > 0) && bright(ndp->cthru) > FTINY) {
243 <                double  dx = vsrc[0] + ndp->vray[0];
244 <                double  dy = vsrc[1] + ndp->vray[1];
245 <                if (dx*dx + dy*dy <= (2.5*4./PI)*(omega + tomega +
246 <                                                2.*sqrt(omega*tomega)))
243 >                double          dx = vsrc[0] + ndp->vray[0];
244 >                double          dy = vsrc[1] + ndp->vray[1];
245 >                SDSpectralDF    *dfp = (ndp->pr->rod > 0) ?
246 >                        ((ndp->sd->tf != NULL) ? ndp->sd->tf : ndp->sd->tb) :
247 >                        ((ndp->sd->tb != NULL) ? ndp->sd->tb : ndp->sd->tf) ;
248 >
249 >                if (dx*dx + dy*dy <= (2.5*4./PI)*(omega + dfp->minProjSA +
250 >                                                2.*sqrt(omega*dfp->minProjSA)))
251                          return(0);
252          }
253 +        ec = SDsizeBSDF(&tomega, ndp->vray, vsrc, SDqueryMin, ndp->sd);
254 +        if (ec)
255 +                goto baderror;
256                                          /* assign number of samples */
257          sf = specjitter * ndp->pr->rweight;
258          if (tomega <= 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines