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.11 by rschregle, Tue Oct 27 19:06:54 2015 UTC vs.
Revision 2.14 by rschregle, Fri Feb 2 19:47:55 2018 UTC

# Line 538 | Line 538 | void getPhotonPorts ()
538        /* Check if object is a surface and NOT a light source (duh) and
539         * resolve its material via any aliases, then check for inclusion in
540         * port modifier list */
541 <      if (issurface(obj -> otype) && !islight(mat -> otype) &&
541 >      if (issurface(obj -> otype) && mat && !islight(mat -> otype) &&
542            inset(ambset, objndx(mat))) {
543           /* Add photon port */
544           photonPorts = (SRCREC*)realloc(photonPorts,
# Line 757 | Line 757 | void emitPhoton (const EmissionMap* emap, RAY* ray)
757        emitted photon to break up clustering artifacts */
758     photonOrigin [emap -> src -> so -> otype] ((EmissionMap*)emap);
759     /* If we have a local glow source with a maximum radius, then
760 <      restrict our photon to the specified distance (otherwise no limit) */
760 >      restrict our photon to the specified distance, otherwise we set
761 >      the limit imposed by photonMaxDist (or no limit if 0) */
762     if (mod -> otype == MAT_GLOW && !(emap -> src -> sflags & SDISTANT)
763                  && mod -> oargs.farg[3] > FTINY)
764        ray -> rmax = mod -> oargs.farg[3];
765     else
766 <      ray -> rmax = 0;
766 >      ray -> rmax = photonMaxDist;
767     rayorigin(ray, PRIMARY, NULL, NULL);
768    
769     if (!emap -> numSamples) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines