47 |
|
int directinvis = 0; /* sources invisible? */ |
48 |
|
double srcsizerat = .25; /* maximum ratio source size/dist. */ |
49 |
|
|
50 |
+ |
double specthresh = .15; /* specular sampling threshold */ |
51 |
+ |
double specjitter = 1.; /* specular sampling jitter */ |
52 |
+ |
|
53 |
|
int maxdepth = 6; /* maximum recursion depth */ |
54 |
|
double minweight = 5e-3; /* minimum ray weight */ |
55 |
|
|
111 |
|
#else |
112 |
|
report() /* report progress */ |
113 |
|
{ |
111 |
– |
signal(SIGALRM, report); |
114 |
|
tlastrept = time((long *)0); |
115 |
|
sprintf(errmsg, "%ld rays, %4.2f%% done after %5.4f hours\n", |
116 |
|
nrays, pctdone, (tlastrept-tstart)/3600.0); |
117 |
|
eputs(errmsg); |
118 |
+ |
signal(SIGALRM, report); |
119 |
|
} |
120 |
|
#endif |
121 |
|
|
280 |
|
z = pixvalue(scanline[i], i, y); |
281 |
|
if (zline) zline[i] = z; |
282 |
|
if (sd) b = sd[0] > sd[1] ? sd[0] : sd[1]; |
283 |
< |
b = fillsample(scanline+i-xstep, zline ? zline+i-xstep : NULL, |
284 |
< |
i-xstep, y, xstep, 0, b/2); |
283 |
> |
if (i <= xstep) |
284 |
> |
b = fillsample(scanline, zline, 0, y, i, 0, b/2); |
285 |
> |
else |
286 |
> |
b = fillsample(scanline+i-xstep, |
287 |
> |
zline ? zline+i-xstep : NULL, |
288 |
> |
i-xstep, y, xstep, 0, b/2); |
289 |
|
if (sd) *sd++ = nc & 1 ? bl : b; |
290 |
|
bl = b; |
291 |
|
} |