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

Comparing ray/src/cv/bsdfrep.c (file contents):
Revision 2.16 by greg, Tue Oct 22 05:48:05 2013 UTC vs.
Revision 2.17 by greg, Thu Oct 24 16:11:38 2013 UTC

# Line 258 | Line 258 | rbf_volume(const RBFVAL *rbfp)
258   double
259   eval_rbfrep(const RBFNODE *rp, const FVECT outvec)
260   {
261 +        const double    rfact2 = (38./M_PI/M_PI)*(grid_res*grid_res);
262          double          minval = bsdf_min*output_orient*outvec[2];
263          int             pos[2];
264          double          res = 0;
# Line 280 | Line 281 | eval_rbfrep(const RBFNODE *rp, const FVECT outvec)
281                                  (pos[1]-rbfp->gy)*(pos[1]-rbfp->gy);
282                  rad2 = R2ANG(rbfp->crad);
283                  rad2 *= rad2;
284 <                if (d2 > (38.*GRIDRES*GRIDRES/M_PI/M_PI)*rad2)
284 >                if (d2 > rad2*rfact2)
285                          continue;
286                  ovec_from_pos(odir, rbfp->gx, rbfp->gy);
287                  res += rbfp->peak * exp((DOT(odir,outvec) - 1.) / rad2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines