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

Comparing ray/src/rt/ashikhmin.c (file contents):
Revision 2.4 by greg, Thu Dec 4 05:26:28 2014 UTC vs.
Revision 2.6 by greg, Wed Sep 2 18:59:01 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"
18  
19   #ifndef  MAXITER
20   #define  MAXITER        10              /* maximum # specular ray attempts */
# Line 92 | Line 93 | dirashik(              /* compute source contribution */
93          scalecolor(ctmp, dtmp);        
94          addcolor(cval, ctmp);
95  
96 <        if (!(np->specfl & SPA_REFL))
96 >        if (!(np->specfl & SPA_REFL) || ambRayInPmap(np->rp))
97                  return;
98          /*
99           *  Compute specular reflection coefficient
# Line 216 | Line 217 | getacoords_as(         /* set up coordinate system */
217          if (normalize(np->v) == 0.0) {
218                  if (fabs(np->u_power - np->v_power) > 0.1)
219                          objerror(np->mp, WARNING, "bad orientation vector");
220 <                getperpendicular(np->u, np->pnorm);     /* punting */
220 >                getperpendicular(np->u, np->pnorm, 1);  /* punting */
221                  fcross(np->v, np->pnorm, np->u);
222                  np->u_power = np->v_power =
223                          2./(1./(np->u_power+1e-5) + 1./(np->v_power+1e-5));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines