263 |
|
int sn; |
264 |
|
RREAL sp[MAXVERT][2]; |
265 |
|
{ |
266 |
< |
static char cubeord[8][6] = {{1,3,2,6,4,5},{0,4,5,7,3,2}, |
266 |
> |
static short cubeord[8][6] = {{1,3,2,6,4,5},{0,4,5,7,3,2}, |
267 |
|
{0,1,3,7,6,4},{0,1,5,7,6,2}, |
268 |
|
{0,2,6,7,5,1},{0,4,6,7,3,1}, |
269 |
|
{0,2,3,7,5,4},{1,5,4,6,2,3}}; |
409 |
|
if (source[sp->sn].sflags & SSPOT && |
410 |
|
spotout(&sr, source[sp->sn].sl.s)) |
411 |
|
continue; /* outside spot */ |
412 |
< |
rayorigin(&sr, NULL, SHADOW, 1.0); |
413 |
< |
sr.rsrc = sp->sn; |
412 |
> |
w = poly_area(ppoly, npv) * hres * vres; |
413 |
> |
if (w < .95) { /* subpixel source */ |
414 |
> |
rayorigin(&sr, NULL, SHADOW, 1.0); |
415 |
> |
sr.rsrc = sp->sn; |
416 |
> |
} else |
417 |
> |
rayorigin(&sr, NULL, PRIMARY, 1.0); |
418 |
|
rayvalue(&sr); /* compute value */ |
419 |
|
if (bright(sr.rcol) <= FTINY) |
420 |
|
continue; /* missed/blocked */ |
423 |
|
sr.rt < 0.999*zbf[y-y0][x-x0]) |
424 |
|
zbf[y-y0][x-x0] = sr.rt; |
425 |
|
else if (!bigdiff(sr.rcol, pic[y-y0][x-x0], |
426 |
< |
0.001)) /* source sample */ |
426 |
> |
0.01)) /* source sample */ |
427 |
|
setcolor(pic[y-y0][x-x0], 0., 0., 0.); |
424 |
– |
w = poly_area(ppoly, npv) * hres * vres; |
428 |
|
scalecolor(sr.rcol, w); |
429 |
|
scalecolor(pic[y-y0][x-x0], 1.-w); |
430 |
|
addcolor(pic[y-y0][x-x0], sr.rcol); |