--- ray/src/rt/normal.c 2003/06/17 21:49:57 2.44 +++ ray/src/rt/normal.c 2003/08/28 03:22:16 2.46 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: normal.c,v 2.44 2003/06/17 21:49:57 greg Exp $"; +static const char RCSid[] = "$Id: normal.c,v 2.46 2003/08/28 03:22:16 greg Exp $"; #endif /* * normal.c - shading function for normal materials. @@ -15,6 +15,8 @@ static const char RCSid[] = "$Id: normal.c,v 2.44 2003 #include "ray.h" +#include "ambient.h" + #include "otypes.h" #include "random.h" @@ -87,7 +89,7 @@ double omega; /* light source size */ /* Fresnel estimate */ ldiff = np->rdiff; - if (np->specfl & SP_PURE && (np->rspec > FTINY & ldiff > FTINY)) + if (np->specfl & SP_PURE && (np->rspec > FTINY) & (ldiff > FTINY)) ldiff *= 1. - FRESNE(fabs(ldot)); if (ldot > FTINY && ldiff > FTINY) { @@ -198,7 +200,7 @@ register RAY *r; if ((nd.alpha2 *= nd.alpha2) <= FTINY) nd.specfl |= SP_PURE; - if (hastexture = (DOT(r->pert,r->pert) > FTINY*FTINY)) { + if ( (hastexture = (DOT(r->pert,r->pert) > FTINY*FTINY)) ) { nd.pdot = raynormal(nd.pnorm, r); /* perturb normal */ } else { VCOPY(nd.pnorm, r->ron);