--- ray/src/rt/pmapsrc.c 2015/08/18 18:45:55 2.7 +++ ray/src/rt/pmapsrc.c 2015/09/29 18:16:34 2.10 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pmapsrc.c,v 2.7 2015/08/18 18:45:55 greg Exp $"; +static const char RCSid[] = "$Id: pmapsrc.c,v 2.10 2015/09/29 18:16:34 rschregle Exp $"; #endif /* ================================================================== @@ -10,8 +10,7 @@ static const char RCSid[] = "$Id: pmapsrc.c,v 2.7 2015 (c) Lucerne University of Applied Sciences and Arts, supported by the Swiss National Science Foundation (SNSF, #147053) ================================================================== - - $Id: pmapsrc.c,v 2.7 2015/08/18 18:45:55 greg Exp $ + */ @@ -535,7 +534,11 @@ void getPhotonPorts () for (i = 0; i < nobjects; i++) { obj = objptr(i); - if (inset(ambset, obj -> omod)) { + /* Check if object is a surface and NOT a light source (duh) and + * resolve its material via any aliases, then check for inclusion in + * port modifier list */ + if (issurface(obj -> otype) && !islight(obj -> otype) && + inset(ambset, objndx(findmaterial(obj)))) { /* Add photon port */ photonPorts = (SRCREC*)realloc(photonPorts, (numPhotonPorts + 1) *