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.7 by greg, Tue Aug 18 18:45:55 2015 UTC

# Line 1 | Line 1
1 + #ifndef lint
2 + static const char RCSid[] = "$Id$";
3 + #endif
4   /*
5     ==================================================================
6     Photon map support routines for emission from light sources
# Line 671 | Line 674 | void initPhotonEmission (EmissionMap *emap, float numP
674          
675        VCOPY(r.rorg, emap -> photonOrg);
676        VCOPY(r.rop, emap -> photonOrg);
677 <      r.rmax = FHUGE;
677 >      r.rmax = 0;
678        
679        for (t = 0; t < emap -> numTheta; t++) {
680           for (p = 0; p < emap -> numPhi; p++) {
# Line 746 | Line 749 | void emitPhoton (const EmissionMap* emap, RAY* ray)
749     /* Choose a new origin within current partition for every
750        emitted photon to break up clustering artifacts */
751     photonOrigin [emap -> src -> so -> otype] ((EmissionMap*)emap);
752 +   /* If we have a local glow source with a maximum radius, then
753 +      restrict our photon to the specified distance (otherwise no limit) */
754 +   if (mod -> otype == MAT_GLOW && !(emap -> src -> sflags & SDISTANT)
755 +                && mod -> oargs.farg[3] > FTINY)
756 +      ray -> rmax = mod -> oargs.farg[3];
757 +   else
758 +      ray -> rmax = 0;
759     rayorigin(ray, PRIMARY, NULL, NULL);
750   ray -> rmax = FHUGE;
760    
761     if (!emap -> numSamples) {
762        /* Source is unmodified and has no port, and either local with

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines