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

Comparing ray/src/rt/pmapsrc.c (file contents):
Revision 2.4 by greg, Thu May 21 13:54:59 2015 UTC vs.
Revision 2.5 by greg, Fri May 22 11:38:26 2015 UTC

# Line 671 | Line 671 | void initPhotonEmission (EmissionMap *emap, float numP
671          
672        VCOPY(r.rorg, emap -> photonOrg);
673        VCOPY(r.rop, emap -> photonOrg);
674 <      r.rmax = FHUGE;
674 >      r.rmax = 0;
675        
676        for (t = 0; t < emap -> numTheta; t++) {
677           for (p = 0; p < emap -> numPhi; p++) {
# Line 746 | Line 746 | void emitPhoton (const EmissionMap* emap, RAY* ray)
746     /* Choose a new origin within current partition for every
747        emitted photon to break up clustering artifacts */
748     photonOrigin [emap -> src -> so -> otype] ((EmissionMap*)emap);
749 +   /* If we have a local glow source with a maximum radius, then
750 +      restrict our photon to the specified distance (otherwise no limit) */
751 +   if (mod -> otype == MAT_GLOW && emap -> src -> so -> otype != OBJ_SOURCE
752 +                && mod -> oargs.farg[3] > FTINY)
753 +      ray -> rmax = mod -> oargs.farg[3];
754 +   else
755 +      ray -> rmax = 0;
756     rayorigin(ray, PRIMARY, NULL, NULL);
750   ray -> rmax = FHUGE;
757    
758     if (!emap -> numSamples) {
759        /* Source is unmodified and has no port, and either local with

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines