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

Comparing ray/src/rt/normal.c (file contents):
Revision 2.70 by greg, Thu May 21 05:54:54 2015 UTC vs.
Revision 2.72 by greg, Wed Sep 2 18:59:01 2015 UTC

# Line 112 | Line 112 | dirnorm(               /* compute source contribution */
112                  scalecolor(ctmp, dtmp);
113                  addcolor(cval, ctmp);
114          }
115 <        
115 >
116          if (ldot < -FTINY && ltdiff > FTINY) {
117                  /*
118                   *  Compute diffuse transmission.
# Line 122 | Line 122 | dirnorm(               /* compute source contribution */
122                  scalecolor(ctmp, dtmp);
123                  addcolor(cval, ctmp);
124          }
125 <        
126 <        /* PMAP: skip direct specular via ambient bounce if already accounted for
127 <         * in photon map */
125 >
126          if (ambRayInPmap(np->rp))
127 <                return;
127 >                return;         /* specular already in photon map */
128  
129          if (ldot > FTINY && (np->specfl&(SP_REFL|SP_PURE)) == SP_REFL) {
130                  /*
# Line 269 | Line 267 | m_normal(                      /* color a ray that hit something normal *
267                  nd.tdiff = nd.tspec = nd.trans = 0.0;
268                                                  /* transmitted ray */
269  
270 <        /* PMAP: skip indirect specular trans via ambient bounce if already
273 <         * accounted for in photon map */
274 <        if (!ambRayInPmap(r) &&
275 <                    (nd.specfl&(SP_TRAN|SP_PURE|SP_TBLT)) == (SP_TRAN|SP_PURE)) {
270 >        if ((nd.specfl&(SP_TRAN|SP_PURE|SP_TBLT)) == (SP_TRAN|SP_PURE)) {
271                  RAY  lr;
272                  copycolor(lr.rcoef, nd.mcolor); /* modified by color */
273                  scalecolor(lr.rcoef, nd.tspec);
# Line 317 | Line 312 | m_normal(                      /* color a ray that hit something normal *
312                  checknorm(nd.vrefl);
313          }
314                                                  /* reflected ray */
315 <        /* PMAP: skip indirect specular refl via ambient ray if already accounted
321 <         * for in photon map */
322 <        if (!ambRayInPmap(r) &&
323 <                    (nd.specfl&(SP_REFL|SP_PURE|SP_RBLT)) == (SP_REFL|SP_PURE)) {
315 >        if ((nd.specfl&(SP_REFL|SP_PURE|SP_RBLT)) == (SP_REFL|SP_PURE)) {
316                  RAY  lr;
317                  if (rayorigin(&lr, REFLECTED, r, nd.scolor) == 0) {
318                          VCOPY(lr.rdir, nd.vrefl);
# Line 340 | Line 332 | m_normal(                      /* color a ray that hit something normal *
332          if (nd.specfl & SP_PURE && nd.rdiff <= FTINY && nd.tdiff <= FTINY)
333                  return(1);                      /* 100% pure specular */
334  
335 <        /* PMAP: skip indirect gaussian via ambient bounce if already accounted
336 <         * for in photon map */
345 <        if (!ambRayInPmap(r))  
346 <                if (!(nd.specfl & SP_PURE))
347 <                        gaussamp(&nd);          /* checks *BLT flags */
335 >        if (!(nd.specfl & SP_PURE))
336 >                gaussamp(&nd);                  /* checks *BLT flags */
337  
338          if (nd.rdiff > FTINY) {         /* ambient from this side */
339                  copycolor(ctmp, nd.mcolor);     /* modified by material color */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines