196 |
|
sprintf(errmsg, "cannot open ambient file \"%s\"", ambfile); |
197 |
|
error(SYSTEM, errmsg); |
198 |
|
} |
199 |
– |
#ifdef getc_unlocked |
200 |
– |
flockfile(ambfp); /* application-level lock */ |
201 |
– |
#endif |
199 |
|
#ifdef F_SETLKW |
200 |
|
aflock(F_UNLCK); /* release file */ |
201 |
|
#endif |
664 |
|
|
665 |
|
/* PMAP: Factor in ambient from global photon map (if enabled) and return |
666 |
|
* as all ambient components accounted for */ |
667 |
< |
if (ambGlobalPmap(aval, r, rdepth)) |
667 |
> |
if (ambPmap(aval, r, rdepth)) |
668 |
|
return; |
669 |
|
|
670 |
|
/* PMAP: Otherwise factor in ambient from caustic photon map |
671 |
< |
* (ambCausticPmap() returns zero if caustic photons disabled) and |
671 |
> |
* (ambPmapCaustic() returns zero if caustic photons disabled) and |
672 |
|
* continue with RADIANCE ambient calculation */ |
673 |
|
copycolor(caustic, aval); |
674 |
< |
ambCausticPmap(caustic, r, rdepth); |
674 |
> |
ambPmapCaustic(caustic, r, rdepth); |
675 |
|
|
676 |
|
if (ambdiv <= 0) /* no ambient calculation */ |
677 |
|
goto dumbamb; |