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

Comparing ray/src/rt/source.c (file contents):
Revision 2.66 by greg, Thu May 28 09:13:19 2015 UTC vs.
Revision 2.67 by rschregle, Tue Feb 23 12:42:41 2016 UTC

# Line 12 | Line 12 | static const char RCSid[] = "$Id$";
12   #include  "rtotypes.h"
13   #include  "source.h"
14   #include  "random.h"
15 #include  "pmap.h"
15   #include  "pmapsrc.h"
16 + #include  "pmapmat.h"
17  
18   #ifndef MAXSSAMP
19   #define MAXSSAMP        16              /* maximum samples per ray */
# Line 683 | Line 683 | weaksrcmat(OBJECT obj)         /* identify material */
683   * The same is true for stray specular samples, since the specular
684   * contribution from light sources is calculated separately.
685   */
686 <
687 < #define  badcomponent(m, r)     (r->crtype&(AMBIENT|SPECULAR) && \
686 > /* PMAP: Also avoid counting sources via transferred ambient rays (e.g.
687 > * through glass) when photon mapping is enabled, as these indirect
688 > * components are already accounted for.
689 > */
690 > #define  badcomponent(m, r)   (srcRayInPmap(r) || \
691 >                                (r->crtype&(AMBIENT|SPECULAR) && \
692                                  !(r->crtype&SHADOW || r->rod < 0.0 || \
693 <                /* not 100% correct */  distglow(m, r, r->rot)))
693 >                /* not 100% correct */  distglow(m, r, r->rot))))
694  
695   /* passillum *
696   *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines