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.78 by greg, Tue Jan 9 00:51:51 2018 UTC vs.
Revision 2.79 by greg, Tue Jan 9 00:52:35 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"
23  
24   #ifndef OLDAMB
25  
# Line 678 | Line 675 | ambcorral(AMBHEMI *hp, FVECT uv[2], const double r0, c
675                  for (a1 = ang-ang_res; a1 <= ang+ang_res; a1 += ang_step)
676                          flgs |= 1L<<(int)(16/PI*(a1 + 2.*PI*(a1 < 0)));
677              }
681                                        /* add low-angle incident (< 20deg) */
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) {
688                        ang = atan2a(v, u);
689                        ang += 2.*PI*(ang < 0);
690                        ang *= 16/PI;
691                        if ((ang < .5) | (ang >= 31.5))
692                                flgs |= 0x80000001;
693                        else
694                                flgs |= 3L<<(int)(ang-.5);
695                }
696        }
678          return(flgs);
679   }
680  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines