201 |
|
scalecolor(ctmp, dtmp); |
202 |
|
addcolor(cval, ctmp); |
203 |
|
} |
204 |
+ |
if (ambRayInPmap(np->pr)) |
205 |
+ |
return; /* specular already in photon map */ |
206 |
|
/* |
207 |
|
* Compute scattering coefficient using BSDF. |
208 |
|
*/ |
258 |
|
scalecolor(ctmp, dtmp); |
259 |
|
addcolor(cval, ctmp); |
260 |
|
} |
261 |
+ |
if (ambRayInPmap(np->pr)) |
262 |
+ |
return; /* specular already in photon map */ |
263 |
|
/* |
264 |
|
* Compute reflection coefficient using BSDF. |
265 |
|
*/ |
309 |
|
scalecolor(ctmp, dtmp); |
310 |
|
addcolor(cval, ctmp); |
311 |
|
} |
312 |
+ |
if (ambRayInPmap(np->pr)) |
313 |
+ |
return; /* specular already in photon map */ |
314 |
|
/* |
315 |
|
* Compute scattering coefficient using BSDF. |
316 |
|
*/ |
471 |
|
} |
472 |
|
/* check other rays to pass */ |
473 |
|
if (nd.thick != 0 && (!(r->crtype & (SPECULAR|AMBIENT)) || |
474 |
< |
nd.thick > 0 ^ hitfront)) { |
474 |
> |
(nd.thick > 0) ^ hitfront)) { |
475 |
|
raytrans(r); /* hide our proxy */ |
476 |
|
return(1); |
477 |
|
} |
472 |
– |
|
473 |
– |
/* PMAP: skip ambient ray if accounted for by photon map */ |
474 |
– |
if (ambRayInPmap(r)) |
475 |
– |
return(1); |
476 |
– |
|
478 |
|
/* get BSDF data */ |
479 |
|
nd.sd = loadBSDF(m->oargs.sarg[1]); |
480 |
|
/* diffuse reflectance */ |