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

Comparing ray/src/rt/aniso.c (file contents):
Revision 2.58 by greg, Tue Feb 24 19:39:26 2015 UTC vs.
Revision 2.60 by greg, Tue May 26 13:21:07 2015 UTC

# Line 14 | Line 14 | static const char RCSid[] = "$Id$";
14   #include  "source.h"
15   #include  "func.h"
16   #include  "random.h"
17 #include  "pmapmat.h"
17  
18   #ifndef  MAXITER
19   #define  MAXITER        10              /* maximum # specular ray attempts */
# Line 108 | Line 107 | diraniso(              /* compute source contribution */
107                  scalecolor(ctmp, dtmp);
108                  addcolor(cval, ctmp);
109          }
111
112        /* PMAP: skip direct specular refl via ambient bounce if already
113         * accounted for in photon map */
114        if (ambRayInPmap(np->rp))
115                return;
110          
111          if (ldot > FTINY && np->specfl&SP_REFL) {
112                  /*
# Line 276 | Line 270 | m_aniso(                       /* shade ray that hit something anisotropic
270  
271          getacoords(&nd);                        /* set up coordinates */
272  
273 <        /* PMAP: skip indirect specular via ambient bounce if already accounted
280 <         * for in photon map */
281 <        if (!ambRayInPmap(r) && nd.specfl & (SP_REFL|SP_TRAN))
273 >        if (nd.specfl & (SP_REFL|SP_TRAN))
274                  agaussamp(&nd);
275  
276          if (nd.rdiff > FTINY) {         /* ambient from this side */
# Line 333 | Line 325 | getacoords(            /* set up coordinate system */
325          if (normalize(np->v) == 0.0) {
326                  if (fabs(np->u_alpha - np->v_alpha) > 0.001)
327                          objerror(np->mp, WARNING, "illegal orientation vector");
328 <                getperpendicular(np->u, np->pnorm);     /* punting */
328 >                getperpendicular(np->u, np->pnorm, 1);  /* punting */
329                  fcross(np->v, np->pnorm, np->u);
330                  np->u_alpha = np->v_alpha = sqrt( 0.5 *
331                          (np->u_alpha*np->u_alpha + np->v_alpha*np->v_alpha) );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines