--- ray/src/rt/dielectric.c 1990/03/27 11:39:58 1.3 +++ ray/src/rt/dielectric.c 1991/08/05 13:52:20 1.6 @@ -66,6 +66,8 @@ register RAY *r; if (m->oargs.nfargs != (m->otype==MAT_DIELECTRIC ? 5 : 8)) objerror(m, USER, "bad arguments"); + r->rt = r->rot; /* just use ray length */ + raytexture(r, m->omod); /* get modifiers */ cos1 = raynormal(dnorm, r); /* cosine of theta1 */ @@ -127,6 +129,7 @@ register RAY *r; if (m->otype != MAT_DIELECTRIC || r->rod > 0.0 || r->crtype & SHADOW + || directinvis || m->oargs.farg[4] == 0.0 || !disperse(m, r, p.rdir, trans)) #endif @@ -135,7 +138,6 @@ register RAY *r; multcolor(mcolor, r->pcol); /* modify */ scalecolor(p.rcol, trans); addcolor(r->rcol, p.rcol); - r->rt = r->rot + p.rt; } } } @@ -151,8 +153,6 @@ register RAY *r; scalecolor(p.rcol, refl); /* color contribution */ addcolor(r->rcol, p.rcol); - if (refl > trans) - r->rt = r->rot + p.rt; } multcolor(r->rcol, mcolor); /* multiply by transmittance */