--- ray/src/rt/aniso.c 2003/03/03 00:10:51 2.36 +++ ray/src/rt/aniso.c 2003/03/12 04:59:05 2.38 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: aniso.c,v 2.36 2003/03/03 00:10:51 greg Exp $"; +static const char RCSid[] = "$Id: aniso.c,v 2.38 2003/03/12 04:59:05 greg Exp $"; #endif /* * Shading functions for anisotropic materials. @@ -265,7 +265,8 @@ register RAY *r; /* diffuse reflection */ nd.rdiff = 1.0 - nd.trans - nd.rspec; - if (r->ro != NULL && isflat(r->ro->otype)) + if (r->ro != NULL && isflat(r->ro->otype) && + DOT(r->pert,r->pert) <= FTINY*FTINY) nd.specfl |= SP_FLAT; getacoords(r, &nd); /* set up coordinates */ @@ -318,7 +319,7 @@ register ANISODAT *np; errno = 0; for (i = 0; i < 3; i++) np->u[i] = evalue(mf->ep[i]); - if (errno) { + if (errno == EDOM || errno == ERANGE) { objerror(np->mp, WARNING, "compute error"); np->specfl |= SP_BADU; return;