--- ray/src/cv/bsdfrbf.c 2013/11/08 23:32:54 2.15 +++ ray/src/cv/bsdfrbf.c 2014/02/18 16:42:16 2.18 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: bsdfrbf.c,v 2.15 2013/11/08 23:32:54 greg Exp $"; +static const char RCSid[] = "$Id: bsdfrbf.c,v 2.18 2014/02/18 16:42:16 greg Exp $"; #endif /* * Radial basis function representation for BSDF data. @@ -32,10 +32,10 @@ static const char RCSid[] = "$Id: bsdfrbf.c,v 2.15 201 #define RSCA 2.2 /* radius scaling factor (empirical) */ #endif #ifndef SMOOTH_MSE -#define SMOOTH_MSE 5e-5 /* acceptable mean squared error */ +#define SMOOTH_MSE 2e-5 /* acceptable mean squared error */ #endif #ifndef SMOOTH_MSER -#define SMOOTH_MSER 0.07 /* acceptable relative MSE */ +#define SMOOTH_MSER 0.03 /* acceptable relative MSE */ #endif #define MAX_RAD (GRIDRES/8) /* maximum lobe radius */ @@ -91,8 +91,8 @@ add_bsdf_data(double theta_out, double phi_out, double static void comp_bsdf_min() { - int cnt; - int i, target; + unsigned long cnt, target; + int i; cnt = 0; for (i = HISTLEN; i--; ) @@ -151,7 +151,7 @@ smooth_region(int x0, int x1, int y0, int y1) rMtx[2][1] = rMtx[1][2]; nvs = rMtx[2][2]; if (SDinvXform(rMtx, rMtx) != SDEnone) - return(0); + return(1); /* colinear values */ A = DOT(rMtx[0], xvec); B = DOT(rMtx[1], xvec); C = DOT(rMtx[2], xvec);