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

Comparing ray/src/rt/glass.c (file contents):
Revision 1.2 by greg, Wed Jun 7 08:38:33 1989 UTC vs.
Revision 1.6 by greg, Tue May 7 17:45:51 1991 UTC

# Line 60 | Line 60 | register RAY  *r;
60  
61          if (r->rod < 0.0)                       /* reorient if necessary */
62                  flipsurface(r);
63 +        r->rt = r->rot;                         /* default ray length */
64                                                  /* get modifiers */
65          raytexture(r, m->omod);
66          pdot = raynormal(pnorm, r);
# Line 81 | Line 82 | register RAY  *r;
82          }
83                                                  /* transmitted ray */
84          if (rayorigin(&p, r, TRANS, bright(trans)) == 0) {
85 <                VCOPY(p.rdir, r->rdir);
85 >                for (i = 0; i < 3; i++)         /* perturb direction */
86 >                        p.rdir[i] = r->rdir[i] - r->pert[i]/RINDEX;
87 >                normalize(p.rdir);
88                  rayvalue(&p);
89                  multcolor(p.rcol, r->pcol);     /* modify */
90                  multcolor(p.rcol, trans);
91                  addcolor(r->rcol, p.rcol);
92 +                if (bright(p.rcol) > .5)
93 +                        r->rt = r->rot + p.rt;
94          }
95 +
96          if (r->crtype & SHADOW)                 /* skip reflected ray */
97                  return;
98                                                  /* compute reflectance */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines