553 |
|
return(1); /* second shadow test */ |
554 |
|
set_dcomp(&wd, 1); |
555 |
|
set_scomp(&wd, 0); |
556 |
< |
wd.specfl |= SP_FLAT*(r->ro != NULL && isflat(r->ro->otype)); |
556 |
> |
wd.specfl |= SP_FLAT*(!wd.rs.mo.hastexture && |
557 |
> |
r->ro != NULL && isflat(r->ro->otype)); |
558 |
|
/* apply Fresnel adjustments? */ |
559 |
|
if (wd.specfl & SP_RPURE && pbright(wd.rs.scol) >= FRESTHRESH) { |
560 |
|
const double fest = FRESNE(fabs(wd.rs.mo.pdot)); |
613 |
|
copyscolor(r->mcol, lr.rcol); |
614 |
|
saddscolor(r->rcol, lr.rcol); |
615 |
|
r->rmt = r->rot; |
616 |
< |
if (wd.specfl & SP_FLAT && |
616 |
< |
!wd.rs.mo.hastexture | (r->crtype & AMBIENT)) |
616 |
> |
if (wd.specfl & SP_FLAT && r->crtype & AMBIENT) |
617 |
|
r->rmt += raydistance(&lr); |
618 |
|
} |
619 |
|
if (wd.specfl & (SP_REFL|SP_TRAN)) /* specularly scattered rays */ |