--- ray/src/rt/aniso.c 1992/03/03 16:20:00 2.11 +++ ray/src/rt/aniso.c 1992/04/22 09:05:27 2.14 @@ -121,7 +121,7 @@ double omega; /* light source size */ /* worth using? */ if (dtmp > FTINY) { copycolor(ctmp, np->scolor); - dtmp *= omega / np->pdot; + dtmp *= omega * sqrt(ldot/np->pdot); scalecolor(ctmp, dtmp); addcolor(cval, ctmp); } @@ -146,7 +146,7 @@ double omega; /* light source size */ /* worth using? */ if (dtmp > FTINY) { copycolor(ctmp, np->mcolor); - dtmp *= np->tspec * omega / np->pdot; + dtmp *= np->tspec * omega * sqrt(ldot/np->pdot); scalecolor(ctmp, dtmp); addcolor(cval, ctmp); } @@ -205,8 +205,8 @@ register RAY *r; nd.rspec += (1.0-nd.rspec)*dtmp; /* check threshold */ if (specthresh > FTINY && - ((specthresh >= 1.-FTINY || - specthresh + (.05 - .1*frandom()) > nd.rspec))) + (specthresh >= 1.-FTINY || + specthresh > nd.rspec)) nd.specfl |= SP_RBLT; /* compute refl. direction */ for (i = 0; i < 3; i++) @@ -224,9 +224,8 @@ register RAY *r; nd.specfl |= SP_TRAN; /* check threshold */ if (specthresh > FTINY && - ((specthresh >= 1.-FTINY || - specthresh + - (.05 - .1*frandom()) > nd.tspec))) + (specthresh >= 1.-FTINY || + specthresh > nd.tspec)) nd.specfl |= SP_TBLT; if (DOT(r->pert,r->pert) <= FTINY*FTINY) { VCOPY(nd.prdir, r->rdir);