11 |
|
|
12 |
|
#include "ray.h" |
13 |
|
#include "paths.h" |
14 |
+ |
#include "pmapopt.h" |
15 |
|
|
16 |
|
|
17 |
< |
extern int |
17 |
> |
int |
18 |
|
getrenderopt( /* get next render option */ |
19 |
|
int ac, |
20 |
|
char *av[] |
83 |
|
check(3,"f"); |
84 |
|
specthresh = atof(av[1]); |
85 |
|
return(1); |
86 |
< |
case 'j': /* jitter */ |
86 |
> |
case 's': /* sampling */ |
87 |
|
check(3,"f"); |
88 |
|
specjitter = atof(av[1]); |
89 |
|
return(1); |
209 |
|
} |
210 |
|
break; |
211 |
|
} |
212 |
< |
return(-1); /* unknown option */ |
212 |
> |
|
213 |
> |
/* PMAP: Parse photon mapping options */ |
214 |
> |
return(getPmapRenderOpt(ac, av)); |
215 |
> |
|
216 |
> |
/* return(-1); */ /* unknown option */ |
217 |
|
|
218 |
|
#undef check |
219 |
|
#undef bool |
220 |
|
} |
221 |
|
|
222 |
|
|
223 |
< |
extern void |
223 |
> |
void |
224 |
|
print_rdefaults(void) /* print default render values to stdout */ |
225 |
|
{ |
226 |
|
printf(do_irrad ? "-i+\t\t\t\t# irradiance calculation on\n" : |
227 |
|
"-i-\t\t\t\t# irradiance calculation off\n"); |
228 |
< |
printf(rand_samp ? "-u+\t\t\t\t# uncorrelated sampling on\n" : |
229 |
< |
"-u-\t\t\t\t# uncorrelated sampling off\n"); |
228 |
> |
printf(rand_samp ? "-u+\t\t\t\t# uncorrelated Monte Carlo sampling\n" : |
229 |
> |
"-u-\t\t\t\t# correlated quasi-Monte Carlo sampling\n"); |
230 |
|
printf(backvis ? "-bv+\t\t\t\t# back face visibility on\n" : |
231 |
|
"-bv-\t\t\t\t# back face visibility off\n"); |
232 |
|
printf("-dt %f\t\t\t# direct threshold\n", shadthresh); |
237 |
|
printf("-dp %-9d\t\t\t# direct pretest density\n", vspretest); |
238 |
|
printf(directvis ? "-dv+\t\t\t\t# direct visibility on\n" : |
239 |
|
"-dv-\t\t\t\t# direct visibility off\n"); |
240 |
< |
printf("-sj %f\t\t\t# specular jitter\n", specjitter); |
240 |
> |
printf("-ss %f\t\t\t# specular sampling\n", specjitter); |
241 |
|
printf("-st %f\t\t\t# specular threshold\n", specthresh); |
242 |
|
printf("-av %f %f %f\t# ambient value\n", colval(ambval,RED), |
243 |
|
colval(ambval,GRN), colval(ambval, BLU)); |
257 |
|
printf("-ms %f\t\t\t# mist sampling distance\n", ssampdist); |
258 |
|
printf("-lr %-9d\t\t\t# limit reflection%s\n", maxdepth, |
259 |
|
maxdepth<=0 ? " (Russian roulette)" : ""); |
260 |
< |
printf("-lw %f\t\t\t# limit weight\n", minweight); |
260 |
> |
printf("-lw %.2e\t\t\t# limit weight\n", minweight); |
261 |
> |
|
262 |
> |
/* PMAP: output photon map defaults */ |
263 |
> |
printPmapDefaults(); |
264 |
|
} |