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.3 by greg, Tue Mar 27 11:40:00 1990 UTC vs.
Revision 1.4 by greg, Wed May 30 19:57:01 1990 UTC

# Line 49 | Line 49 | register RAY  *r;
49          FVECT  pnorm;
50          double  cos2;
51          COLOR  trans, refl;
52 +        double  transbright;
53          double  d, r1;
54          RAY  p;
55          register int  i;
# Line 79 | Line 80 | register RAY  *r;
80                  d = colval(mcolor, i);
81                  colval(trans,i) = (1.0-r1)*(1.0-r1)*d / (1.0 - r1*r1*d*d);
82          }
83 +        transbright = -FTINY;
84                                                  /* transmitted ray */
85          if (rayorigin(&p, r, TRANS, bright(trans)) == 0) {
86                  VCOPY(p.rdir, r->rdir);
# Line 86 | Line 88 | register RAY  *r;
88                  multcolor(p.rcol, r->pcol);     /* modify */
89                  multcolor(p.rcol, trans);
90                  addcolor(r->rcol, p.rcol);
91 +                transbright = bright(p.rcol);
92                  r->rt = r->rot + p.rt;
93          }
94  
# Line 104 | Line 107 | register RAY  *r;
107                  rayvalue(&p);
108                  multcolor(p.rcol, refl);
109                  addcolor(r->rcol, p.rcol);
110 <                if (bright(refl) > bright(trans))
110 >                if (bright(p.rcol) > transbright)
111                          r->rt = r->rot + p.rt;
112          }
113   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines