107 |
|
return(-1); |
108 |
|
if (r->crtype & SHADOW) /* shadow commitment */ |
109 |
|
return(0); |
110 |
+ |
/* ambient in photon map? */ |
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"); |
189 |
|
{ |
190 |
|
RAY tr; |
191 |
|
|
192 |
< |
if (rayorigin(&tr, TRANS, r, NULL) == 0) { |
193 |
< |
VCOPY(tr.rdir, r->rdir); |
194 |
< |
rayvalue(&tr); |
195 |
< |
copycolor(r->rcol, tr.rcol); |
196 |
< |
r->rt = r->rot + tr.rt; |
190 |
< |
} |
192 |
> |
rayorigin(&tr, TRANS, r, NULL); /* always continue */ |
193 |
> |
VCOPY(tr.rdir, r->rdir); |
194 |
> |
rayvalue(&tr); |
195 |
> |
copycolor(r->rcol, tr.rcol); |
196 |
> |
r->rt = r->rot + tr.rt; |
197 |
|
} |
198 |
|
|
199 |
|
|