ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmap.c
(Generate patch)

Comparing ray/src/rt/pmap.c (file contents):
Revision 2.14 by rschregle, Tue Mar 20 19:55:33 2018 UTC vs.
Revision 2.15 by rschregle, Thu Jun 7 19:26:04 2018 UTC

# Line 69 | Line 69 | static int photonParticipate (RAY *ray)
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          
# Line 444 | Line 450 | void distribPhotons (PhotonMap **pmaps, unsigned numPr
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              

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines