96 |
|
fclose(fp); |
97 |
|
} |
98 |
|
#ifdef DEBUG |
99 |
< |
fprintf(stderr, "Minimum BSDF set to %.4f\n", bsdf_min); |
99 |
> |
fprintf(stderr, "Minimum BSDF set to %.4g\n", bsdf_min); |
100 |
|
#endif |
101 |
< |
min_log = log(bsdf_min*.5 + 1e-5); |
101 |
> |
min_log = log(bsdf_min*.5 + 1e-6); |
102 |
|
/* output BSDF rep. */ |
103 |
|
for (n = 0; (n < 6) & (2*n+3 < argc); n++) { |
104 |
|
double theta = (M_PI/180.)*atof(argv[2*n+2]); |
124 |
|
rbf = advect_rbf(idir, 15000); |
125 |
|
#ifdef DEBUG |
126 |
|
if (inpXML) |
127 |
< |
fprintf(stderr, "Hemispherical %s: %.3f\n", |
127 |
> |
fprintf(stderr, "Hemispherical %s: %.4f\n", |
128 |
|
(output_orient > 0 ^ input_orient > 0 ? |
129 |
|
"transmission" : "reflection"), |
130 |
|
SDdirectHemi(idir, SDsampSp|SDsampDf | |
133 |
|
else if (rbf == NULL) |
134 |
|
fputs("Empty RBF\n", stderr); |
135 |
|
else |
136 |
< |
fprintf(stderr, "Hemispherical %s: %.3f\n", |
136 |
> |
fprintf(stderr, "Hemispherical %s: %.4f\n", |
137 |
|
(output_orient > 0 ^ input_orient > 0 ? |
138 |
|
"transmission" : "reflection"), |
139 |
|
rbf->vtotal); |
173 |
|
bsdf = sval.cieY; |
174 |
|
} else |
175 |
|
bsdf = eval_rbfrep(rbf, odir); |
176 |
< |
bsdf = log(bsdf + 1e-5) - min_log; |
176 |
> |
bsdf = log(bsdf + 1e-6) - min_log; |
177 |
|
fprintf(fp, "%.8e %.8e %.8e\n", |
178 |
|
odir[0]*bsdf, odir[1]*bsdf, odir[2]*bsdf); |
179 |
|
} |