# | Line 59 | Line 59 | int ambPmapCaustic (COLOR aval, RAY *r, int rdepth) | |
---|---|---|
59 | PhotonMap *pmap = contribPhotonMapping ? contribPmap : causticPmap; | |
60 | ||
61 | /* Get caustic photon density estimate only at primary rays */ | |
62 | < | if (pmap && !rdepth) { |
62 | > | if (pmap && (!rdepth || (!globalPmap & !contribPmap & !preCompPmap |
63 | > | && r->crtype & AMBIENT))) { |
64 | /* Temporarily factor ambient value into ray coefficient | |
65 | * (required for contribution photon map) */ | |
66 | copycolor(rcoef, r -> rcoef); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |