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.71 by greg, Tue May 26 13:21:07 2015 UTC

# Line 123 | Line 123 | dirnorm(               /* compute source contribution */
123                  addcolor(cval, ctmp);
124          }
125          
126        /* PMAP: skip direct specular via ambient bounce if already accounted for
127         * in photon map */
128        if (ambRayInPmap(np->rp))
129                return;
130
126          if (ldot > FTINY && (np->specfl&(SP_REFL|SP_PURE)) == SP_REFL) {
127                  /*
128                   *  Compute specular reflection coefficient using
# Line 269 | Line 264 | m_normal(                      /* color a ray that hit something normal *
264                  nd.tdiff = nd.tspec = nd.trans = 0.0;
265                                                  /* transmitted ray */
266  
267 <        /* 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)) {
267 >        if ((nd.specfl&(SP_TRAN|SP_PURE|SP_TBLT)) == (SP_TRAN|SP_PURE)) {
268                  RAY  lr;
269                  copycolor(lr.rcoef, nd.mcolor); /* modified by color */
270                  scalecolor(lr.rcoef, nd.tspec);
# Line 317 | Line 309 | m_normal(                      /* color a ray that hit something normal *
309                  checknorm(nd.vrefl);
310          }
311                                                  /* reflected ray */
312 <        /* 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)) {
312 >        if ((nd.specfl&(SP_REFL|SP_PURE|SP_RBLT)) == (SP_REFL|SP_PURE)) {
313                  RAY  lr;
314                  if (rayorigin(&lr, REFLECTED, r, nd.scolor) == 0) {
315                          VCOPY(lr.rdir, nd.vrefl);
# Line 340 | Line 329 | m_normal(                      /* color a ray that hit something normal *
329          if (nd.specfl & SP_PURE && nd.rdiff <= FTINY && nd.tdiff <= FTINY)
330                  return(1);                      /* 100% pure specular */
331  
332 <        /* PMAP: skip indirect gaussian via ambient bounce if already accounted
333 <         * for in photon map */
345 <        if (!ambRayInPmap(r))  
346 <                if (!(nd.specfl & SP_PURE))
347 <                        gaussamp(&nd);          /* checks *BLT flags */
332 >        if (!(nd.specfl & SP_PURE))
333 >                gaussamp(&nd);                  /* checks *BLT flags */
334  
335          if (nd.rdiff > FTINY) {         /* ambient from this side */
336                  copycolor(ctmp, nd.mcolor);     /* modified by material color */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines