4 |
|
|
5 |
|
Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) |
6 |
|
(c) Fraunhofer Institute for Solar Energy Systems, |
7 |
< |
Lucerne University of Applied Sciences & Arts |
7 |
> |
(c) Lucerne University of Applied Sciences and Arts, |
8 |
> |
supported by the Swiss National Science Foundation (SNSF, #147053) |
9 |
|
================================================================== |
10 |
|
|
11 |
|
$Id$ |
65 |
|
for (t = 0; t < NUM_PMAP_TYPES; t++) |
66 |
|
if (setPmapParam(&pm, parm + t)) { |
67 |
|
/* Check if photon map newer than octree */ |
68 |
< |
if (!stat(pm -> fileName, &pmstat) && !stat(octname, &octstat) && |
68 |
> |
if (pm -> fileName && octname && |
69 |
> |
!stat(pm -> fileName, &pmstat) && !stat(octname, &octstat) && |
70 |
|
octstat.st_mtime > pmstat.st_mtime) { |
71 |
|
sprintf(errmsg, "photon map in file %s may be stale", |
72 |
|
pm -> fileName); |
206 |
|
OBJREC* mat; |
207 |
|
|
208 |
|
if (ray -> rlvl > photonMaxBounce) { |
209 |
+ |
#ifdef PMAP_RUNAWAY_WARN |
210 |
|
error(WARNING, "runaway photon!"); |
211 |
+ |
#endif |
212 |
|
return; |
213 |
|
} |
214 |
< |
|
214 |
> |
|
215 |
|
if (colorAvg(ray -> cext) > FTINY && !photonParticipate(ray)) |
216 |
|
return; |
217 |
|
|