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.12 by greg, Wed Mar 20 01:00:22 2013 UTC vs.
Revision 2.13 by greg, Sun Mar 24 17:22:23 2013 UTC

# Line 247 | Line 247 | pos_from_vec(int pos[2], const FVECT vec)
247   double
248   eval_rbfrep(const RBFNODE *rp, const FVECT outvec)
249   {
250 +        double          minval = bsdf_min*output_orient*outvec[2];
251          double          res = 0;
252          const RBFVAL    *rbfp;
253          FVECT           odir;
# Line 256 | Line 257 | eval_rbfrep(const RBFNODE *rp, const FVECT outvec)
257          if (rp == NULL) {
258                  if (outvec[2] > 0 ^ output_orient > 0)
259                          return(.0);
260 <                return(bsdf_min*output_orient*outvec[2]);
260 >                return(minval);
261          }
262          rbfp = rp->rbfa;
263          for (n = rp->nrbf; n--; rbfp++) {
# Line 266 | Line 267 | eval_rbfrep(const RBFNODE *rp, const FVECT outvec)
267                  if (sig2 > -19.)
268                          res += rbfp->peak * exp(sig2);
269          }
270 +        if (res < minval)       /* never return less than minval */
271 +                return(minval);
272          return(res);
273   }
274  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines