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.73 by greg, Wed Apr 17 16:46:00 2024 UTC vs.
Revision 2.74 by greg, Wed Sep 18 19:52:35 2024 UTC

# Line 238 | Line 238 | direct_specular_OK(SCOLOR scval, FVECT ldir, double om
238   {
239          int     nsamp = 1;
240          int     scnt = 0;
241 <        FVECT   vsrc, vjit;
241 >        FVECT   vsrc;
242          double  tomega, tomega2;
243          double  tsr, sd[2];
244          SCOLOR  csmp, cdiff;
# Line 306 | Line 306 | direct_specular_OK(SCOLOR scval, FVECT ldir, double om
306                  nsamp = 4.*specjitter*ndp->pr->rweight + .5;
307                  nsamp += !nsamp;
308          }
309 <                                        /* jitter to fuzz BSDF cells */
310 <        for (i = nsamp; i--; ) {
309 >        for (i = nsamp; i--; ) {        /* jitter to fuzz BSDF cells */
310 >                FVECT   vjit;
311                  bsdf_jitter(vjit, ndp, tsr);
312                                          /* compute BSDF */
313                  ec = SDevalBSDF(&sv, vjit, vsrc, ndp->sd);
314                  if (ec)
315                          goto baderror;
316 <                if (sv.cieY - diffY <= FTINY)
317 <                        continue;       /* no specular part */
316 >                if (sv.cieY - diffY <= FTINY) {
317 >                        ++scnt;         /* still counts as 0 contribution */
318 >                        continue;
319 >                }
320                                          /* check for variable resolution */
321                  ec = SDsizeBSDF(&tomega2, vjit, vsrc, SDqueryMin, ndp->sd);
322                  if (ec)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines