--- ray/src/rt/glass.c 1996/04/11 15:59:56 2.8 +++ ray/src/rt/glass.c 2003/03/03 00:10:51 2.12 @@ -1,15 +1,12 @@ -/* Copyright (c) 1991 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: glass.c,v 2.12 2003/03/03 00:10:51 greg Exp $"; #endif - /* * glass.c - simpler shading function for thin glass surfaces. - * - * 11/14/86 */ +#include "copyright.h" + #include "ray.h" #include "otypes.h" @@ -26,7 +23,7 @@ static char SCCSid[] = "$SunId$ LBL"; * modifier glass id * 0 * 0 - * 3 red grn blu + * 3+ red grn blu [refractive_index] * * The color is used for the transmission at normal incidence. * To compute transmissivity (tn) from transmittance (Tn) use: @@ -69,12 +66,13 @@ 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); + /* perturb normal */ if (hastexture = DOT(r->pert,r->pert) > FTINY*FTINY) pdot = raynormal(pnorm, r); else {