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

Comparing ray/src/rt/ambcomp.c (file contents):
Revision 2.77 by greg, Fri Apr 21 16:07:29 2017 UTC vs.
Revision 2.78 by greg, Tue Jan 9 00:51:51 2018 UTC

# Line 20 | Line 20 | static const char      RCSid[] = "$Id$";
20   #include  "ray.h"
21   #include  "ambient.h"
22   #include  "random.h"
23 + #include  "source.h"
24 + #include  "otypes.h"
25 + #include  "otspecial.h"
26  
27   #ifndef OLDAMB
28  
# Line 646 | Line 649 | ambcorral(AMBHEMI *hp, FVECT uv[2], const double r0, c
649          FVECT           vec;
650          double          u, v;
651          double          ang, a1;
652 +        OBJREC          *m;
653          int             i, j;
654                                          /* don't bother for a few samples */
655          if (hp->ns < 8)
# Line 675 | Line 679 | ambcorral(AMBHEMI *hp, FVECT uv[2], const double r0, c
679                          flgs |= 1L<<(int)(16/PI*(a1 + 2.*PI*(a1 < 0)));
680              }
681                                          /* add low-angle incident (< 20deg) */
682 <        if (fabs(hp->rp->rod) <= 0.342) {
682 >        if (fabs(hp->rp->rod) <= 0.342 && hp->rp->parent != NULL &&
683 >                        (m = findmaterial(hp->rp->parent->ro)) != NULL &&
684 >                        isopaque(m->otype)) {
685                  u = -DOT(hp->rp->rdir, uv[0]);
686                  v = -DOT(hp->rp->rdir, uv[1]);
687                  if ((r0*r0*u*u + r1*r1*v*v) > hp->rp->rot*hp->rp->rot) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines