| 214 |
|
if (ray -> robj > -1 && islight(objptr(ray -> ro -> omod) -> otype)) |
| 215 |
|
return -1; |
| 216 |
|
|
| 217 |
< |
/* if modifier in include/exclude set */ |
| 217 |
> |
/* Ignore photon if modifier in/outside exclude/include set */ |
| 218 |
|
if (ambincl != -1 && ray -> ro && |
| 219 |
|
ambincl != inset(ambset, ray -> ro -> omod)) |
| 220 |
|
return -1; |
| 233 |
|
if (!inROI) |
| 234 |
|
return -1; |
| 235 |
|
} |
| 236 |
< |
|
| 236 |
> |
|
| 237 |
|
/* Adjust flux according to distribution ratio and ray weight */ |
| 238 |
|
copycolor(photonFlux, ray -> rcol); |
| 239 |
|
scalecolor(photonFlux, |
| 240 |
|
ray -> rweight / (pmap -> distribRatio ? pmap -> distribRatio |
| 241 |
|
: 1)); |
| 242 |
|
setPhotonFlux(&photon, photonFlux); |
| 243 |
< |
|
| 243 |
> |
|
| 244 |
|
/* Set photon position and flags */ |
| 245 |
|
VCOPY(photon.pos, ray -> rop); |
| 246 |
|
photon.flags = 0; |
| 383 |
|
/* Scale photon's flux (hitherto normalised to 1 over RGB); in |
| 384 |
|
* case of a contrib photon map, this is done per light source, |
| 385 |
|
* and photonFlux is assumed to be an array */ |
| 386 |
< |
getPhotonFlux(p, flux); |
| 386 |
> |
getPhotonFlux(p, flux); |
| 387 |
|
|
| 388 |
|
if (photonFlux) { |
| 389 |
|
scalecolor(flux, photonFlux [isContribPmap(pmap) ? |