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.72 by greg, Fri Apr 5 01:10:26 2024 UTC vs.
Revision 2.73 by greg, Wed Apr 17 16:46:00 2024 UTC

# Line 534 | Line 534 | sample_sdcomp(BSDFDAT *ndp, SDComponent *dcp, int xmit
534                  if (rayorigin(&sr, xmit ? TSPECULAR : RSPECULAR, ndp->pr, sr.rcoef) < 0) {
535                          if (!n & (nstarget > 1)) {
536                                  n = nstarget;   /* avoid infinitue loop */
537 <                                nstarget = nstarget*sr.rweight/minweight;
537 >                                nstarget = nstarget*sr.rweight/(minweight + 1e-20);
538                                  if (n == nstarget) break;
539                                  n = -1;         /* moved target */
540                          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines