29 |
|
|
30 |
|
double dstrsrc = 0.0; /* square source distribution */ |
31 |
|
double shadthresh = .1; /* shadow threshold */ |
32 |
+ |
double shadcert = .25; /* shadow certainty */ |
33 |
|
|
34 |
|
int maxdepth = 4; /* maximum recursion depth */ |
35 |
|
double minweight = 1e-2; /* minimum ray weight */ |
36 |
|
|
37 |
|
COLOR ambval = BLKCOLOR; /* ambient value */ |
38 |
|
double ambacc = 0.2; /* ambient accuracy */ |
39 |
< |
int ambres = 64; /* ambient resolution */ |
39 |
> |
int ambres = 8; /* ambient resolution */ |
40 |
|
int ambdiv = 32; /* ambient divisions */ |
41 |
|
int ambssamp = 0; /* ambient super-samples */ |
42 |
|
int ambounce = 0; /* ambient bounces */ |
68 |
|
devopen(dname) /* open device driver */ |
69 |
|
char *dname; |
70 |
|
{ |
71 |
< |
extern char *progname; |
72 |
< |
char *devargv[3]; |
71 |
> |
extern char *progname, *octname; |
72 |
> |
char *id; |
73 |
|
register int i; |
74 |
+ |
|
75 |
+ |
id = octname!=NULL ? octname : progname; |
76 |
|
/* check device table */ |
77 |
|
for (i = 0; devtable[i].name; i++) |
78 |
|
if (!strcmp(dname, devtable[i].name)) |
79 |
< |
if ((dev = (*devtable[i].init)(progname)) == NULL) { |
79 |
> |
if ((dev = (*devtable[i].init)(dname, id)) == NULL) { |
80 |
|
sprintf(errmsg, "cannot initialize %s", dname); |
81 |
|
error(USER, errmsg); |
82 |
|
} else |
83 |
|
return; |
84 |
|
/* not there, try exec */ |
85 |
< |
devargv[0] = dname; |
83 |
< |
devargv[1] = progname; |
84 |
< |
devargv[2] = NULL; |
85 |
< |
if ((dev = comm_init(devargv)) == NULL) { |
85 |
> |
if ((dev = comm_init(dname, id)) == NULL) { |
86 |
|
sprintf(errmsg, "cannot start device \"%s\"", dname); |
87 |
|
error(USER, errmsg); |
88 |
|
} |
198 |
|
goto commerr; |
199 |
|
getmove(args); |
200 |
|
break; |
201 |
< |
case 'r': /* rotate camera */ |
202 |
< |
if (badcom("rotate")) |
203 |
< |
goto commerr; |
201 |
> |
case 'r': /* rotate/repaint */ |
202 |
> |
if (badcom("rotate")) { |
203 |
> |
if (badcom("repaint")) |
204 |
> |
goto commerr; |
205 |
> |
getrepaint(args); |
206 |
> |
break; |
207 |
> |
} |
208 |
|
getrotate(args); |
209 |
|
break; |
210 |
|
case 'p': /* pivot view */ |