69 |
|
colorNorm(ray -> rcol); |
70 |
|
VCOPY(ray -> rorg, ray -> rop); |
71 |
|
|
72 |
+ |
#if 0 |
73 |
|
if (albedo > FTINY && ray -> rlvl > 0) |
74 |
+ |
#else |
75 |
+ |
/* Store volume photons unconditionally in mist to also account for |
76 |
+ |
direct inscattering from sources */ |
77 |
+ |
if (albedo > FTINY) |
78 |
+ |
#endif |
79 |
|
/* Add to volume photon map */ |
80 |
|
newPhoton(volumePmap, ray); |
81 |
|
|
339 |
|
initPhotonEmissionFuncs(); |
340 |
|
initPhotonScatterFuncs(); |
341 |
|
|
342 |
< |
/* Get photon ports if specified */ |
343 |
< |
if (ambincl == 1) |
338 |
< |
getPhotonPorts(); |
342 |
> |
/* Get photon ports from modifier list */ |
343 |
> |
getPhotonPorts(photonPortList); |
344 |
|
|
345 |
|
/* Get photon sensor modifiers */ |
346 |
|
getPhotonSensors(photonSensorList); |
450 |
|
pmapSeed(randSeed + (proc + 3) % numProc, mediumState); |
451 |
|
pmapSeed(randSeed + (proc + 4) % numProc, scatterState); |
452 |
|
pmapSeed(randSeed + (proc + 5) % numProc, rouletteState); |
453 |
< |
|
453 |
> |
|
454 |
> |
#ifdef DEBUG_PMAP |
455 |
> |
/* Output child process PID after random delay to prevent corrupted |
456 |
> |
* console output due to race condition */ |
457 |
> |
usleep(1e6 * pmapRandom(rouletteState)); |
458 |
> |
fprintf(stderr, "Proc %d: PID = %d " |
459 |
> |
"(waiting 10 sec to attach debugger...)\n", |
460 |
> |
proc, getpid()); |
461 |
> |
/* Allow time for debugger to attach to child process */ |
462 |
> |
sleep(10); |
463 |
> |
#endif |
464 |
> |
|
465 |
|
for (t = 0; t < NUM_PMAP_TYPES; t++) |
466 |
|
lastNumPhotons [t] = 0; |
467 |
|
|