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.80 by greg, Wed Apr 11 17:05:59 2018 UTC

# Line 674 | Line 674 | ambcorral(AMBHEMI *hp, FVECT uv[2], const double r0, c
674                  for (a1 = ang-ang_res; a1 <= ang+ang_res; a1 += ang_step)
675                          flgs |= 1L<<(int)(16/PI*(a1 + 2.*PI*(a1 < 0)));
676              }
677                                        /* add low-angle incident (< 20deg) */
678        if (fabs(hp->rp->rod) <= 0.342) {
679                u = -DOT(hp->rp->rdir, uv[0]);
680                v = -DOT(hp->rp->rdir, uv[1]);
681                if ((r0*r0*u*u + r1*r1*v*v) > hp->rp->rot*hp->rp->rot) {
682                        ang = atan2a(v, u);
683                        ang += 2.*PI*(ang < 0);
684                        ang *= 16/PI;
685                        if ((ang < .5) | (ang >= 31.5))
686                                flgs |= 0x80000001;
687                        else
688                                flgs |= 3L<<(int)(ang-.5);
689                }
690        }
677          return(flgs);
678   }
679  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines