--- ray/src/rt/normal.c 2014/01/25 18:27:39 2.66 +++ ray/src/rt/normal.c 2014/05/10 17:43:01 2.67 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: normal.c,v 2.66 2014/01/25 18:27:39 greg Exp $"; +static const char RCSid[] = "$Id: normal.c,v 2.67 2014/05/10 17:43:01 greg Exp $"; #endif /* * normal.c - shading function for normal materials. @@ -239,7 +239,7 @@ m_normal( /* color a ray that hit something normal * if (!(nd.specfl & SP_PURE) && specthresh >= nd.tspec-FTINY) nd.specfl |= SP_TBLT; - if (!hastexture || r->crtype & SHADOW) { + if (!hastexture || r->crtype & (SHADOW|AMBIENT)) { VCOPY(nd.prdir, r->rdir); transtest = 2; } else { @@ -306,7 +306,8 @@ m_normal( /* color a ray that hit something normal * rayvalue(&lr); multcolor(lr.rcol, lr.rcoef); addcolor(r->rcol, lr.rcol); - if (!hastexture && nd.specfl & SP_FLAT) { + if (nd.specfl & SP_FLAT && + !hastexture | (r->crtype & AMBIENT)) { mirtest = 2.*bright(lr.rcol); mirdist = r->rot + lr.rt; }