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.67 by greg, Sat May 10 17:43:01 2014 UTC vs.
Revision 2.68 by greg, Thu Dec 4 05:26:28 2014 UTC

# Line 378 | Line 378 | gaussamp(                      /* sample Gaussian specular */
378                          (np->specfl & (SP_TRAN|SP_TBLT)) != SP_TRAN)
379                  return;
380                                          /* set up sample coordinates */
381 <        v[0] = v[1] = v[2] = 0.0;
382 <        for (i = 0; i < 3; i++)
383 <                if (np->pnorm[i] < 0.6 && np->pnorm[i] > -0.6)
384 <                        break;
385 <        v[i] = 1.0;
386 <        fcross(u, v, np->pnorm);
387 <        normalize(u);
381 >        getperpendicular(u, np->pnorm);
382          fcross(v, np->pnorm, u);
383                                          /* compute reflection */
384          if ((np->specfl & (SP_REFL|SP_RBLT)) == SP_REFL &&

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines