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.47 by greg, Mon Feb 12 23:20:31 2018 UTC vs.
Revision 2.48 by greg, Fri May 11 14:26:24 2018 UTC

# Line 490 | Line 490 | sample_sdcomp(BSDFDAT *ndp, SDComponent *dcp, int xmit
490                  if (xmit)                       /* apply pattern on transmit */
491                          multcolor(sr.rcoef, ndp->pr->pcol);
492                  if (rayorigin(&sr, SPECULAR, ndp->pr, sr.rcoef) < 0) {
493 <                        if (maxdepth > 0)
494 <                                break;
495 <                        continue;               /* Russian roulette victim */
493 >                        if (!n & (nstarget > 1)) {
494 >                                nstarget = nstarget*sr.rweight/minweight;
495 >                                n = -1;         /* moved target */
496 >                        }
497 >                        continue;               /* try again */
498                  }
499                  if (xmit && ndp->thick != 0)    /* need to offset origin? */
500                          VSUM(sr.rorg, sr.rorg, ndp->pr->ron, -ndp->thick);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines