--- ray/src/rt/dielectric.c 1998/06/19 12:01:15 2.14 +++ ray/src/rt/dielectric.c 2003/02/25 02:47:22 2.16 @@ -1,15 +1,12 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: dielectric.c,v 2.16 2003/02/25 02:47:22 greg Exp $"; #endif - /* * dielectric.c - shading function for transparent materials. - * - * 9/6/85 */ +#include "copyright.h" + #include "ray.h" #include "otypes.h" @@ -50,10 +47,7 @@ static int lambda(); #define MINCOS 0.997 /* minimum dot product for dispersion */ -extern COLOR cextinction; /* global coefficient of extinction */ -extern COLOR salbedo; /* global scattering albedo */ - static double mylog(x) /* special log for extinction coefficients */ double x; @@ -156,6 +150,8 @@ register RAY *r; refl *= 0.5; trans = 1.0 - refl; + + trans *= nratio*nratio; /* solid angle ratio */ if (rayorigin(&p, r, REFRACTED, trans) == 0) {