--- ray/src/rt/normal.c 1991/05/08 08:27:48 1.9 +++ ray/src/rt/normal.c 1991/08/12 08:20:55 1.12 @@ -155,7 +155,6 @@ register RAY *r; raytexture(r, m->omod); nd.pdot = raynormal(nd.pnorm, r); /* perturb normal */ multcolor(nd.mcolor, r->pcol); /* modify material color */ - r->rt = r->rot; /* default ray length */ transtest = 0; /* get specular component */ nd.rspec = m->oargs.farg[3]; @@ -197,13 +196,16 @@ register RAY *r; if (nd.tspec > FTINY && nd.alpha2 <= FTINY) { RAY lr; if (rayorigin(&lr, r, TRANS, nd.tspec) == 0) { - if (DOT(r->pert,r->pert) > FTINY*FTINY) { + if (!(r->crtype & SHADOW) && + DOT(r->pert,r->pert) > FTINY*FTINY) { for (i = 0; i < 3; i++) /* perturb direction */ lr.rdir[i] = r->rdir[i] - .75*r->pert[i]; normalize(lr.rdir); - } else + } else { + VCOPY(lr.rdir, r->rdir); transtest = 2; + } rayvalue(&lr); scalecolor(lr.rcol, nd.tspec); multcolor(lr.rcol, nd.mcolor); /* modified by color */