| 107 |
|
return(-1); |
| 108 |
|
if (r->crtype & SHADOW) /* shadow commitment */ |
| 109 |
|
return(0); |
| 110 |
+ |
/* ambient in photon map? */ |
| 111 |
+ |
if (photonMapping && ro != NULL && ro->crtype & AMBIENT) |
| 112 |
+ |
return(-1); |
| 113 |
|
if (maxdepth <= 0 && rc != NULL) { /* Russian roulette */ |
| 114 |
|
if (minweight <= 0.0) |
| 115 |
|
error(USER, "zero ray weight in Russian roulette"); |
| 185 |
|
{ |
| 186 |
|
RAY tr; |
| 187 |
|
|
| 188 |
< |
if (rayorigin(&tr, TRANS, r, NULL) == 0) { |
| 189 |
< |
VCOPY(tr.rdir, r->rdir); |
| 190 |
< |
rayvalue(&tr); |
| 191 |
< |
copycolor(r->rcol, tr.rcol); |
| 192 |
< |
r->rt = r->rot + tr.rt; |
| 190 |
< |
} |
| 188 |
> |
rayorigin(&tr, TRANS, r, NULL); /* always continue */ |
| 189 |
> |
VCOPY(tr.rdir, r->rdir); |
| 190 |
> |
rayvalue(&tr); |
| 191 |
> |
copycolor(r->rcol, tr.rcol); |
| 192 |
> |
r->rt = r->rot + tr.rt; |
| 193 |
|
} |
| 194 |
|
|
| 195 |
|
|