444 |
|
if (source[sp->sn].sflags & SSPOT && |
445 |
|
spotout(&sr, source[sp->sn].sl.s)) |
446 |
|
continue; /* outside spot */ |
447 |
< |
w = poly_area(ppoly, npv) * hres * vres; |
448 |
< |
if (w < .95) { /* subpixel source */ |
449 |
< |
rayorigin(&sr, NULL, SHADOW, 1.0); |
450 |
< |
sr.rsrc = sp->sn; |
451 |
< |
} else |
452 |
< |
rayorigin(&sr, NULL, PRIMARY, 1.0); |
447 |
> |
rayorigin(&sr, NULL, PRIMARY, 1.0); |
448 |
|
rayvalue(&sr); /* compute value */ |
449 |
|
if (bright(sr.rcol) <= FTINY) |
450 |
|
continue; /* missed/blocked */ |
451 |
|
/* modify pixel */ |
452 |
+ |
w = poly_area(ppoly, npv) * hres * vres; |
453 |
|
if (zbf[y-y0] != NULL && |
454 |
< |
sr.rt < 0.99*zbf[y-y0][x-x0]) |
454 |
> |
sr.rt < 0.99*zbf[y-y0][x-x0]) { |
455 |
|
zbf[y-y0][x-x0] = sr.rt; |
456 |
< |
else if (!bigdiff(sr.rcol, pic[y-y0][x-x0], |
457 |
< |
0.01)) /* source sample */ |
456 |
> |
} else if (!bigdiff(sr.rcol, pic[y-y0][x-x0], |
457 |
> |
0.01)) { /* source sample */ |
458 |
|
scalecolor(pic[y-y0][x-x0], w); |
459 |
< |
else { |
464 |
< |
scalecolor(sr.rcol, w); |
465 |
< |
scalecolor(pic[y-y0][x-x0], 1.-w); |
466 |
< |
addcolor(pic[y-y0][x-x0], sr.rcol); |
459 |
> |
continue; |
460 |
|
} |
461 |
+ |
scalecolor(sr.rcol, w); |
462 |
+ |
scalecolor(pic[y-y0][x-x0], 1.-w); |
463 |
+ |
addcolor(pic[y-y0][x-x0], sr.rcol); |
464 |
|
} |
465 |
|
} |
466 |
|
} |