| 27 |
|
const double ssamp_thresh = 0.35; |
| 28 |
|
/* number of super-samples */ |
| 29 |
|
#ifndef NSSAMP |
| 30 |
< |
#define NSSAMP 100 |
| 30 |
> |
#define NSSAMP 64 |
| 31 |
|
#endif |
| 32 |
|
/* limit on number of RBF lobes */ |
| 33 |
|
static int lobe_lim = 15000; |
| 38 |
|
static char *wrapBSDF[MAXCARG] = {"wrapBSDF", "-U"}; |
| 39 |
|
static int wbsdfac = 2; |
| 40 |
|
|
| 41 |
< |
/* Add argument to wrapBSDF, allocating space if isstatic */ |
| 41 |
> |
/* Add argument to wrapBSDF, allocating space if !isstatic */ |
| 42 |
|
static void |
| 43 |
|
add_wbsdf(const char *arg, int isstatic) |
| 44 |
|
{ |
| 250 |
|
#endif |
| 251 |
|
} |
| 252 |
|
if (pctcull >= 0) |
| 253 |
< |
fwrite(&bsdf, sizeof(bsdf), 1, ofp); |
| 253 |
> |
putbinary(&bsdf, sizeof(bsdf), 1, ofp); |
| 254 |
|
else |
| 255 |
|
fprintf(ofp, "\t%.3e\n", bsdf); |
| 256 |
|
|
| 257 |
|
if (rbf_colorimetry == RBCtristimulus) { |
| 258 |
|
if (pctcull >= 0) { |
| 259 |
< |
fwrite(&uv[0], sizeof(*uv), 1, uvfp[0]); |
| 260 |
< |
fwrite(&uv[1], sizeof(*uv), 1, uvfp[1]); |
| 259 |
> |
putbinary(&uv[0], sizeof(*uv), 1, uvfp[0]); |
| 260 |
> |
putbinary(&uv[1], sizeof(*uv), 1, uvfp[1]); |
| 261 |
|
} else { |
| 262 |
|
fprintf(uvfp[0], "\t%.3e\n", uv[0]); |
| 263 |
|
fprintf(uvfp[1], "\t%.3e\n", uv[1]); |
| 443 |
|
#endif |
| 444 |
|
} |
| 445 |
|
if (pctcull >= 0) |
| 446 |
< |
fwrite(&bsdf, sizeof(bsdf), 1, ofp); |
| 446 |
> |
putbinary(&bsdf, sizeof(bsdf), 1, ofp); |
| 447 |
|
else |
| 448 |
|
fprintf(ofp, "\t%.3e\n", bsdf); |
| 449 |
|
|
| 450 |
|
if (rbf_colorimetry == RBCtristimulus) { |
| 451 |
|
if (pctcull >= 0) { |
| 452 |
< |
fwrite(&uv[0], sizeof(*uv), 1, uvfp[0]); |
| 453 |
< |
fwrite(&uv[1], sizeof(*uv), 1, uvfp[1]); |
| 452 |
> |
putbinary(&uv[0], sizeof(*uv), 1, uvfp[0]); |
| 453 |
> |
putbinary(&uv[1], sizeof(*uv), 1, uvfp[1]); |
| 454 |
|
} else { |
| 455 |
|
fprintf(uvfp[0], "\t%.3e\n", uv[0]); |
| 456 |
|
fprintf(uvfp[1], "\t%.3e\n", uv[1]); |
| 495 |
|
} |
| 496 |
|
} |
| 497 |
|
|
| 498 |
< |
#ifdef _WIN32 |
| 498 |
> |
#if defined(_WIN32) || defined(_WIN64) |
| 499 |
|
/* Execute wrapBSDF command (may never return) */ |
| 500 |
|
static int |
| 501 |
|
wrap_up(void) |