--- ray/src/rt/normal.c 1993/05/27 15:28:03 2.25 +++ ray/src/rt/normal.c 1994/01/12 16:46:45 2.27 @@ -158,7 +158,7 @@ register RAY *r; register int i; /* easy shadow test */ if (r->crtype & SHADOW && m->otype != MAT_TRANS) - return; + return(1); if (m->oargs.nfargs != (m->otype == MAT_TRANS ? 7 : 5)) objerror(m, USER, "bad number of arguments"); @@ -183,6 +183,7 @@ register RAY *r; nd.pdot = .001; /* non-zero for dirnorm() */ multcolor(nd.mcolor, r->pcol); /* modify material color */ transtest = 0; + transdist = r->rot; /* get specular component */ if ((nd.rspec = m->oargs.farg[3]) > FTINY) { nd.specfl |= SP_REFL; @@ -254,12 +255,12 @@ register RAY *r; transtest = 0; if (r->crtype & SHADOW) /* the rest is shadow */ - return; + return(1); /* diffuse reflection */ nd.rdiff = 1.0 - nd.trans - nd.rspec; if (nd.specfl & SP_PURE && nd.rdiff <= FTINY && nd.tdiff <= FTINY) - return; /* 100% pure specular */ + return(1); /* 100% pure specular */ if (r->ro != NULL && (r->ro->otype == OBJ_FACE || r->ro->otype == OBJ_RING)) @@ -293,6 +294,8 @@ register RAY *r; /* check distance */ if (transtest > bright(r->rcol)) r->rt = transdist; + + return(1); }