457 |
|
raytrans(r); /* pass-through */ |
458 |
|
return(1); /* or shadow */ |
459 |
|
} |
460 |
+ |
/* check backface visibility */ |
461 |
+ |
if (!hitfront & !backvis) { |
462 |
+ |
raytrans(r); |
463 |
+ |
return(1); |
464 |
+ |
} |
465 |
|
/* check other rays to pass */ |
466 |
|
if (nd.thick != 0 && (!(r->crtype & (SPECULAR|AMBIENT)) || |
467 |
|
nd.thick > 0 ^ hitfront)) { |
479 |
|
m->oargs.farg[1], |
480 |
|
m->oargs.farg[2]); |
481 |
|
} else { |
482 |
< |
if (m->oargs.nfargs < 6) { /* check invisible backside */ |
478 |
< |
if (!backvis && (nd.sd->rb == NULL) & |
479 |
< |
(nd.sd->tb == NULL)) { |
480 |
< |
SDfreeCache(nd.sd); |
481 |
< |
raytrans(r); |
482 |
< |
return(1); |
483 |
< |
} |
482 |
> |
if (m->oargs.nfargs < 6) |
483 |
|
setcolor(nd.rdiff, .0, .0, .0); |
484 |
< |
} else |
484 |
> |
else |
485 |
|
setcolor(nd.rdiff, m->oargs.farg[3], |
486 |
|
m->oargs.farg[4], |
487 |
|
m->oargs.farg[5]); |