| 32 |
|
float bsdf; |
| 33 |
|
#if DEBUG |
| 34 |
|
fprintf(stderr, "Writing isotropic order %d ", samp_order); |
| 35 |
< |
if (pctcull >= 0) fprintf(stderr, "data with %f%% culling\n", pctcull); |
| 35 |
> |
if (pctcull >= 0) fprintf(stderr, "data with %.1f%% culling\n", pctcull); |
| 36 |
|
else fputs("raw data\n", stderr); |
| 37 |
|
#endif |
| 38 |
|
if (pctcull >= 0) { /* begin output */ |
| 94 |
|
float bsdf; |
| 95 |
|
#if DEBUG |
| 96 |
|
fprintf(stderr, "Writing anisotropic order %d ", samp_order); |
| 97 |
< |
if (pctcull >= 0) fprintf(stderr, "data with %f%% culling\n", pctcull); |
| 97 |
> |
if (pctcull >= 0) fprintf(stderr, "data with %.1f%% culling\n", pctcull); |
| 98 |
|
else fputs("raw data\n", stderr); |
| 99 |
|
#endif |
| 100 |
|
if (pctcull >= 0) { /* begin output */ |
| 112 |
|
/* run through directions */ |
| 113 |
|
for (ix = 0; ix < sqres; ix++) |
| 114 |
|
for (iy = 0; iy < sqres; iy++) { |
| 115 |
< |
RBFNODE *rbf; |
| 115 |
> |
RBFNODE *rbf; /* Klems reversal */ |
| 116 |
|
SDsquare2disk(ivec, (ix+.5)/sqres, (iy+.5)/sqres); |
| 117 |
+ |
ivec[0] = -ivec[0]; ivec[1] = -ivec[1]; |
| 118 |
|
ivec[2] = input_orient * |
| 119 |
|
sqrt(1. - ivec[0]*ivec[0] - ivec[1]*ivec[1]); |
| 120 |
|
rbf = advect_rbf(ivec); |
| 181 |
|
puts("\t\t<DetectorSpectrum>ASTM E308 1931 Y.dsp</DetectorSpectrum>"); |
| 182 |
|
puts("\t\t<WavelengthDataBlock>"); |
| 183 |
|
printf("\t\t\t<WavelengthDataDirection>%s</WavelengthDataDirection>\n", |
| 184 |
< |
bsdf_type[(input_orient>0)<<1 | (output_orient>0)]); |
| 184 |
> |
bsdf_type[(input_orient>0)<<1 | (output_orient>0)]); |
| 185 |
|
puts("\t\t\t<AngleBasis>LBNL/Shirley-Chiu</AngleBasis>"); |
| 186 |
|
puts("\t\t\t<ScatteringDataType>BTDF</ScatteringDataType>"); |
| 187 |
|
puts("\t\t\t<ScatteringData>"); |