287 |
|
getplaneq(onorm, o); |
288 |
|
/* set number of rays to sample */ |
289 |
|
if (source[sn].sflags & SDISTANT) { |
290 |
< |
n = 4.*or2/(thescene.cusize*thescene.cusize)*vspretest + .5; |
290 |
> |
/* 32. == heuristic constant */ |
291 |
> |
n = 32.*or2/(thescene.cusize*thescene.cusize)*vspretest + .5; |
292 |
|
infront = DOT(onorm, source[sn].sloc) > 0.; |
293 |
|
} else { |
294 |
|
for (i = 0; i < 3; i++) |
319 |
|
#endif |
320 |
|
return(f); /* too small a target! */ |
321 |
|
} |
322 |
+ |
multisamp(offsdir, 3, urand(sn*931+5827+ssn)); |
323 |
|
for (i = 0; i < 3; i++) |
324 |
< |
offsdir[i] = or*(1. - |
323 |
< |
2.*urand(urind(931*i+5827,ssn))); |
324 |
> |
offsdir[i] = or*(1. - 2.*offsdir[i]); |
325 |
|
ssn++; |
326 |
|
for (i = 0; i < 3; i++) |
327 |
|
sr.rorg[i] = oc[i] + offsdir[i]; |