209 |
|
/* check threshold */ |
210 |
|
if (specthresh > FTINY && |
211 |
|
((specthresh >= 1.-FTINY || |
212 |
< |
specthresh + (.05 - .1*urand(8199+samplendx)) |
213 |
< |
> nd.rspec))) |
212 |
> |
specthresh + (.05 - .1*frandom()) > nd.rspec))) |
213 |
|
nd.specfl |= SP_RBLT; |
214 |
|
/* compute refl. direction */ |
215 |
|
for (i = 0; i < 3; i++) |
239 |
|
if (specthresh > FTINY && |
240 |
|
((specthresh >= 1.-FTINY || |
241 |
|
specthresh + |
242 |
< |
(.05 - .1*urand(7241+samplendx)) |
244 |
< |
> nd.tspec))) |
242 |
> |
(.05 - .1*frandom()) > nd.tspec))) |
243 |
|
nd.specfl |= SP_TBLT; |
244 |
|
if (r->crtype & SHADOW || |
245 |
|
DOT(r->pert,r->pert) <= FTINY*FTINY) { |