194 |
|
/* check threshold */ |
195 |
|
if (specthresh > FTINY && |
196 |
|
((specthresh >= 1.-FTINY || |
197 |
< |
specthresh + (.1 - .2*urand(8199+samplendx)) |
198 |
< |
> nd.rspec))) |
197 |
> |
specthresh + (.05 - .1*frandom()) > nd.rspec))) |
198 |
|
nd.specfl |= SP_RBLT; |
199 |
|
/* compute reflected ray */ |
200 |
|
for (i = 0; i < 3; i++) |
224 |
|
if (specthresh > FTINY && |
225 |
|
((specthresh >= 1.-FTINY || |
226 |
|
specthresh + |
227 |
< |
(.1 - .2*urand(7241+samplendx)) |
229 |
< |
> nd.tspec))) |
227 |
> |
(.05 - .1*frandom()) > nd.tspec))) |
228 |
|
nd.specfl |= SP_TBLT; |
229 |
|
if (r->crtype & SHADOW || |
230 |
|
DOT(r->pert,r->pert) <= FTINY*FTINY) { |