| 407 |
|
int nsv, npv; |
| 408 |
|
int xmin, xmax, ymin, ymax, x, y; |
| 409 |
|
RREAL cxy[2]; |
| 410 |
+ |
COLOR rcol; |
| 411 |
|
double w; |
| 412 |
|
RAY sr; |
| 413 |
|
SPLIST *sp; |
| 453 |
|
rayorigin(&sr, SHADOW, NULL, NULL); |
| 454 |
|
sr.rsrc = sp->sn; |
| 455 |
|
rayvalue(&sr); /* compute value */ |
| 456 |
< |
if (bright(sr.rcol) <= FTINY) |
| 456 |
> |
if (sintens(sr.rcol) <= FTINY) |
| 457 |
|
continue; /* missed/blocked */ |
| 458 |
+ |
scolor_rgb(rcol, sr.rcol); |
| 459 |
|
/* modify pixel */ |
| 460 |
|
w = poly_area(ppoly, npv) * hres * vres; |
| 461 |
|
if (zbf[y-y0] != NULL && |
| 462 |
|
sr.rxt < 0.99*zbf[y-y0][x-x0]) { |
| 463 |
|
zbf[y-y0][x-x0] = sr.rxt; |
| 464 |
< |
} else if (!bigdiff(sr.rcol, pic[y-y0][x-x0], |
| 464 |
> |
} else if (!bigdiff(rcol, pic[y-y0][x-x0], |
| 465 |
|
0.01)) { /* source sample */ |
| 466 |
|
scalecolor(pic[y-y0][x-x0], w); |
| 467 |
|
continue; |
| 468 |
|
} |
| 469 |
< |
scalecolor(sr.rcol, w); |
| 469 |
> |
scalecolor(rcol, w); |
| 470 |
|
scalecolor(pic[y-y0][x-x0], 1.-w); |
| 471 |
< |
addcolor(pic[y-y0][x-x0], sr.rcol); |
| 471 |
> |
addcolor(pic[y-y0][x-x0], rcol); |
| 472 |
|
} |
| 473 |
|
} |
| 474 |
|
} |