# | 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 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |