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.1 by greg, Thu Feb 2 10:41:24 1989 UTC vs.
Revision 1.5 by greg, Mon Oct 15 20:39:32 1990 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 80 | Line 81 | register RAY  *r;
81                  colval(trans,i) = (1.0-r1)*(1.0-r1)*d / (1.0 - r1*r1*d*d);
82          }
83                                                  /* transmitted ray */
84 <        if (rayorigin(&p, r, TRANS, intens(trans)) == 0) {
84 >        if (rayorigin(&p, r, TRANS, bright(trans)) == 0) {
85                  VCOPY(p.rdir, r->rdir);
86                  rayvalue(&p);
87                  multcolor(p.rcol, r->pcol);     /* modify */
88                  multcolor(p.rcol, trans);
89                  addcolor(r->rcol, p.rcol);
90 +                if (bright(p.rcol) > .5)
91 +                        r->rt = r->rot + p.rt;
92          }
93 +
94          if (r->crtype & SHADOW)                 /* skip reflected ray */
95                  return;
96                                                  /* compute reflectance */
# Line 96 | Line 100 | register RAY  *r;
100                  colval(refl,i) = r1 * (1.0 + (1.0-2.0*r1)*d) / (1.0 - r1*r1*d);
101          }
102                                                  /* reflected ray */
103 <        if (rayorigin(&p, r, REFLECTED, intens(refl)) == 0) {
103 >        if (rayorigin(&p, r, REFLECTED, bright(refl)) == 0) {
104                  for (i = 0; i < 3; i++)
105                          p.rdir[i] = r->rdir[i] + 2.0*pdot*pnorm[i];
106                  rayvalue(&p);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines