--- ray/src/rt/m_brdf.c 1991/07/16 16:45:55 1.14 +++ ray/src/rt/m_brdf.c 1991/11/12 17:09:08 2.1 @@ -246,16 +246,13 @@ register RAY *r; break; if (i-3 != nd.dp->nd) objerror(m, USER, "dimension error"); - if (!fundefined(m->oargs.sarg[3])) - loadfunc(m->oargs.sarg[2]); + funcfile(m->oargs.sarg[2]); } else if (m->otype == MAT_BRTDF) { nd.dp = NULL; - if (!fundefined(m->oargs.sarg[7])) - loadfunc(m->oargs.sarg[9]); + funcfile(m->oargs.sarg[9]); } else { nd.dp = NULL; - if (!fundefined(m->oargs.sarg[0])) - loadfunc(m->oargs.sarg[1]); + funcfile(m->oargs.sarg[1]); } /* set special variables */ setbrdfunc(&nd); @@ -272,7 +269,8 @@ register RAY *r; objerror(m, WARNING, "compute error"); else if ((tspect = bright(ctmp)) > FTINY && rayorigin(&sr, r, TRANS, tspect) == 0) { - if (DOT(r->pert,r->pert) > FTINY*FTINY) { + if (!(r->crtype & SHADOW) && + DOT(r->pert,r->pert) > FTINY*FTINY) { for (i = 0; i < 3; i++) /* perturb direction */ sr.rdir[i] = r->rdir[i] - .75*r->pert[i];