| 338 |
|
(source[sn].so, &sr) )) |
| 339 |
|
continue; |
| 340 |
|
/* compute contribution */ |
| 341 |
< |
rayshade(&sr, sr.ro->omod); |
| 341 |
> |
raycont(&sr); |
| 342 |
|
multcolor(srccnt[sn].val, sr.rcol); |
| 343 |
|
cntord[sn].brt = bright(srccnt[sn].val); |
| 344 |
|
} |
| 376 |
|
/* test for hit */ |
| 377 |
|
rayorigin(&sr, r, SHADOW, 1.0); |
| 378 |
|
VCOPY(sr.rdir, srccnt[cntord[sn].sno].dir); |
| 379 |
+ |
sr.rsrc = cntord[sn].sno; |
| 380 |
|
if (localhit(&sr, &thescene) && |
| 381 |
|
sr.ro != source[cntord[sn].sno].so) { |
| 382 |
|
/* check for transmission */ |
| 383 |
< |
rayshade(&sr, sr.ro->omod); |
| 383 |
> |
raycont(&sr); |
| 384 |
|
if (bright(sr.rcol) <= FTINY) |
| 385 |
|
continue; /* missed! */ |
| 386 |
|
(*f)(srccnt[cntord[sn].sno].val, p, |
| 395 |
|
} |
| 396 |
|
/* weighted hit rate */ |
| 397 |
|
hwt = hit2 / test2; |
| 398 |
< |
#ifdef notdef |
| 398 |
> |
#ifdef DEBUG |
| 399 |
|
sprintf(errmsg, "%d tested, %d untested, %f hit rate\n", |
| 400 |
|
sn, ncnts-sn, hwt); |
| 401 |
|
eputs(errmsg); |
| 453 |
|
m->oargs.farg[2]); |
| 454 |
|
/* modify value */ |
| 455 |
|
multcolor(r->rcol, r->pcol); |
| 456 |
+ |
/* assign distance */ |
| 457 |
+ |
r->rt = r->rot; |
| 458 |
|
} |
| 459 |
|
} |
| 460 |
|
|