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

Comparing ray/src/rt/raytrace.c (file contents):
Revision 2.65 by greg, Wed Feb 19 14:12:48 2014 UTC vs.
Revision 2.66 by greg, Tue Feb 24 19:39:27 2015 UTC

# Line 14 | Line 14 | static const char RCSid[] = "$Id$";
14   #include  "otypes.h"
15   #include  "otspecial.h"
16   #include  "random.h"
17 + #include  "pmap.h"
18  
19   #define  MAXCSET        ((MAXSET+1)*2-1)        /* maximum check set size */
20  
# Line 249 | Line 250 | rayparticipate(                        /* compute ray medium participation
250          multcolor(r->rcol, ce);                 /* path extinction */
251          if (r->crtype & SHADOW || intens(r->albedo) <= FTINY)
252                  return;                         /* no scattering */
253 <        setcolor(ca,
254 <                colval(r->albedo,RED)*colval(ambval,RED)*(1.-colval(ce,RED)),
255 <                colval(r->albedo,GRN)*colval(ambval,GRN)*(1.-colval(ce,GRN)),
256 <                colval(r->albedo,BLU)*colval(ambval,BLU)*(1.-colval(ce,BLU)));
257 <        addcolor(r->rcol, ca);                  /* ambient in scattering */
253 >        
254 >        /* PMAP: indirect inscattering accounted for by volume photons? */
255 >        if (!volumePhotonMapping) {
256 >                setcolor(ca,
257 >                        colval(r->albedo,RED)*colval(ambval,RED)*(1.-colval(ce,RED)),
258 >                        colval(r->albedo,GRN)*colval(ambval,GRN)*(1.-colval(ce,GRN)),
259 >                        colval(r->albedo,BLU)*colval(ambval,BLU)*(1.-colval(ce,BLU)));
260 >                addcolor(r->rcol, ca);                  /* ambient in scattering */
261 >        }
262 >        
263          srcscatter(r);                          /* source in scattering */
264   }
265  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines