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.17 by rschregle, Tue Dec 18 22:14:04 2018 UTC vs.
Revision 2.18 by rschregle, Fri Feb 19 02:10:35 2021 UTC

# Line 9 | Line 9 | static const char RCSid[] = "$Id$";
9  
10     Roland Schregle (roland.schregle@{hslu.ch, gmail.com})
11     (c) Fraunhofer Institute for Solar Energy Systems,
12 +       supported by the German Research Foundation
13 +       (DFG LU-204/10-2, "Fassadenintegrierte Regelsysteme FARESYS")
14     (c) Lucerne University of Applied Sciences and Arts,
15 <       supported by the Swiss National Science Foundation (SNSF, #147053)
15 >       supported by the Swiss National Science Foundation
16 >       (SNSF #147053, "Daylight Redirecting Components")
17     ======================================================================
18    
19     $Id$
# Line 25 | Line 28 | static const char RCSid[] = "$Id$";
28   #include "pmapbias.h"
29   #include "pmapdiag.h"
30   #include "otypes.h"
31 + #include "otspecial.h"
32   #include <time.h>
33   #if NIX
34     #include <sys/stat.h>
# Line 169 | Line 173 | void tracePhoton (RAY *ray)
173     if (localhit(ray, &thescene)) {
174        mod = ray -> ro -> omod;
175  
176 <      if (port && ray -> ro != port) {
176 >      /* XXX: Is port -> omod != mod sufficient here? Probably not... */
177 >      if (
178 >         port && ray -> ro != port &&
179 >         findmaterial(port) != findmaterial(ray -> ro)
180 >      ) {
181           /* !!! PHOTON PORT REJECTION SAMPLING HACK !!!
182 <          * Terminate photon if emitted from port without intersecting it;
183 <          * this can happen when the port's partitions extend beyond its
182 >          * Terminate photon if emitted from port without intersecting it or
183 >          * its other associated surfaces or same material.
184 >          * This can happen when the port's partitions extend beyond its
185            * actual geometry, e.g.  with polygons.  Since the total flux
186            * relayed by the port is based on the (in this case) larger
187            * partition area, it is overestimated; terminating these photons

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines