ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/normal.c
(Generate patch)

Comparing ray/src/rt/normal.c (file contents):
Revision 1.9 by greg, Wed May 8 08:27:48 1991 UTC vs.
Revision 1.12 by greg, Mon Aug 12 08:20:55 1991 UTC

# Line 155 | Line 155 | register RAY  *r;
155          raytexture(r, m->omod);
156          nd.pdot = raynormal(nd.pnorm, r);       /* perturb normal */
157          multcolor(nd.mcolor, r->pcol);          /* modify material color */
158        r->rt = r->rot;                         /* default ray length */
158          transtest = 0;
159                                                  /* get specular component */
160          nd.rspec = m->oargs.farg[3];
# Line 197 | Line 196 | register RAY  *r;
196          if (nd.tspec > FTINY && nd.alpha2 <= FTINY) {
197                  RAY  lr;
198                  if (rayorigin(&lr, r, TRANS, nd.tspec) == 0) {
199 <                        if (DOT(r->pert,r->pert) > FTINY*FTINY) {
199 >                        if (!(r->crtype & SHADOW) &&
200 >                                        DOT(r->pert,r->pert) > FTINY*FTINY) {
201                                  for (i = 0; i < 3; i++) /* perturb direction */
202                                          lr.rdir[i] = r->rdir[i] -
203                                                          .75*r->pert[i];
204                                  normalize(lr.rdir);
205 <                        } else
205 >                        } else {
206 >                                VCOPY(lr.rdir, r->rdir);
207                                  transtest = 2;
208 +                        }
209                          rayvalue(&lr);
210                          scalecolor(lr.rcol, nd.tspec);
211                          multcolor(lr.rcol, nd.mcolor);  /* modified by color */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines