# | Line 108 | Line 108 | rayorigin( /* start new ray from old one */ | |
---|---|---|
108 | if (r->crtype & SHADOW) /* shadow commitment */ | |
109 | return(0); | |
110 | /* ambient in photon map? */ | |
111 | < | if (r->crtype & AMBIENT && photonMapping) |
112 | < | return(-1); |
111 | > | if (ro != NULL && ro->crtype & AMBIENT) { |
112 | > | if (causticPhotonMapping) |
113 | > | return(-1); |
114 | > | if (photonMapping && rt != TRANS) |
115 | > | return(-1); |
116 | > | } |
117 | if (maxdepth <= 0 && rc != NULL) { /* Russian roulette */ | |
118 | if (minweight <= 0.0) | |
119 | error(USER, "zero ray weight in Russian roulette"); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |