--- ray/src/rt/glass.c 2003/02/25 02:47:22 2.11 +++ ray/src/rt/glass.c 2003/03/12 04:59:05 2.13 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: glass.c,v 2.11 2003/02/25 02:47:22 greg Exp $"; +static const char RCSid[] = "$Id: glass.c,v 2.13 2003/03/12 04:59:05 greg Exp $"; #endif /* * glass.c - simpler shading function for thin glass surfaces. @@ -66,15 +66,16 @@ register RAY *r; setcolor(mcolor, m->oargs.farg[0], m->oargs.farg[1], m->oargs.farg[2]); + /* get modifiers */ + raytexture(r, m->omod); if (r->rod < 0.0) /* reorient if necessary */ flipsurface(r); mirtest = transtest = 0; mirdist = transdist = r->rot; - /* get modifiers */ - raytexture(r, m->omod); - if (hastexture = DOT(r->pert,r->pert) > FTINY*FTINY) + /* perturb normal */ + if (hastexture = (DOT(r->pert,r->pert) > FTINY*FTINY)) { pdot = raynormal(pnorm, r); - else { + } else { VCOPY(pnorm, r->ron); pdot = r->rod; }