246 |
|
break; |
247 |
|
if (i-3 != nd.dp->nd) |
248 |
|
objerror(m, USER, "dimension error"); |
249 |
< |
if (!fundefined(m->oargs.sarg[3])) |
250 |
< |
loadfunc(m->oargs.sarg[2]); |
249 |
> |
funcfile(m->oargs.sarg[2]); |
250 |
|
} else if (m->otype == MAT_BRTDF) { |
251 |
|
nd.dp = NULL; |
252 |
< |
if (!fundefined(m->oargs.sarg[7])) |
254 |
< |
loadfunc(m->oargs.sarg[9]); |
252 |
> |
funcfile(m->oargs.sarg[9]); |
253 |
|
} else { |
254 |
|
nd.dp = NULL; |
255 |
< |
if (!fundefined(m->oargs.sarg[0])) |
258 |
< |
loadfunc(m->oargs.sarg[1]); |
255 |
> |
funcfile(m->oargs.sarg[1]); |
256 |
|
} |
257 |
|
/* set special variables */ |
258 |
|
setbrdfunc(&nd); |
269 |
|
objerror(m, WARNING, "compute error"); |
270 |
|
else if ((tspect = bright(ctmp)) > FTINY && |
271 |
|
rayorigin(&sr, r, TRANS, tspect) == 0) { |
272 |
< |
if (DOT(r->pert,r->pert) > FTINY*FTINY) { |
272 |
> |
if (!(r->crtype & SHADOW) && |
273 |
> |
DOT(r->pert,r->pert) > FTINY*FTINY) { |
274 |
|
for (i = 0; i < 3; i++) /* perturb direction */ |
275 |
|
sr.rdir[i] = r->rdir[i] - |
276 |
|
.75*r->pert[i]; |