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

Comparing ray/src/cv/bsdfrbf.c (file contents):
Revision 2.28 by greg, Wed Feb 3 18:42:13 2016 UTC vs.
Revision 2.33 by greg, Wed May 8 16:38:19 2019 UTC

# Line 31 | Line 31 | static const char RCSid[] = "$Id$";
31   #ifndef RSCA
32   #define RSCA            2.0             /* radius scaling factor (empirical) */
33   #endif
34 + #ifndef MAXSLOPE
35 + #define MAXSLOPE        200.0           /* maximum slope for smooth region */
36 + #endif
37   #ifndef SMOOTH_MSE
38   #define SMOOTH_MSE      5e-5            /* acceptable mean squared error */
39   #endif
40   #ifndef SMOOTH_MSER
41 < #define SMOOTH_MSER     0.03            /* acceptable relative MSE */
41 > #define SMOOTH_MSER     0.0016          /* acceptable relative MSE */
42   #endif
43   #define MAX_RAD         (GRIDRES/8)     /* maximum lobe radius */
44  
# Line 209 | Line 212 | smooth_region(int x0, int x1, int y0, int y1)
212                  return(1);              /* colinear values */
213          A = DOT(rMtx[0], xvec);
214          B = DOT(rMtx[1], xvec);
215 +        if (A*A + B*B > MAXSLOPE*MAXSLOPE)      /* too steep? */
216 +                return(0);
217          C = DOT(rMtx[2], xvec);
218          sqerr = 0.0;                    /* compute mean squared error */
219          for (x = x0; x < x1; x++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines