| 280 |
|
VCOPY(srccnt[sn].dir, sr.rdir); |
| 281 |
|
/* compute coefficient */ |
| 282 |
|
(*f)(srccnt[sn].val, p, srccnt[sn].dir, srccnt[sn].dom); |
| 283 |
< |
srccnt[sn].brt = intens(srccnt[sn].val); |
| 283 |
> |
srccnt[sn].brt = bright(srccnt[sn].val); |
| 284 |
|
if (srccnt[sn].brt <= FTINY) |
| 285 |
|
continue; |
| 286 |
|
/* compute intersection */ |
| 292 |
|
/* compute contribution */ |
| 293 |
|
rayshade(&sr, sr.ro->omod); |
| 294 |
|
multcolor(srccnt[sn].val, sr.rcol); |
| 295 |
< |
srccnt[sn].brt = intens(srccnt[sn].val); |
| 295 |
> |
srccnt[sn].brt = bright(srccnt[sn].val); |
| 296 |
|
} |
| 297 |
|
/* sort contributions */ |
| 298 |
|
qsort(srccnt, nsources, sizeof(CONTRIB), cntcmp); |
| 300 |
|
/* test for shadows */ |
| 301 |
|
for (sn = 0; sn < nsources; sn++) { |
| 302 |
|
/* check threshold */ |
| 303 |
< |
if (srccnt[sn].brt <= shadthresh*intens(r->rcol)/r->rweight) |
| 303 |
> |
if (srccnt[sn].brt <= shadthresh*bright(r->rcol)/r->rweight) |
| 304 |
|
break; |
| 305 |
|
/* get statistics */ |
| 306 |
|
hwt = (double)source[srccnt[sn].sno].nhits / |
| 317 |
|
raytrans(&sr); /* object is clipped */ |
| 318 |
|
else |
| 319 |
|
rayshade(&sr, sr.ro->omod); |
| 320 |
< |
if (intens(sr.rcol) <= FTINY) |
| 320 |
> |
if (bright(sr.rcol) <= FTINY) |
| 321 |
|
continue; /* missed! */ |
| 322 |
|
(*f)(srccnt[sn].val, p, srccnt[sn].dir, srccnt[sn].dom); |
| 323 |
|
multcolor(srccnt[sn].val, sr.rcol); |