# | Line 46 | Line 46 | m_glass(m, r) /* color a ray which hit a thin glass s | |
---|---|---|
46 | OBJREC *m; | |
47 | register RAY *r; | |
48 | { | |
49 | – | double sqrt(), pow(); |
49 | COLOR mcolor; | |
50 | double pdot; | |
51 | FVECT pnorm; | |
# | Line 95 | Line 94 | register RAY *r; | |
94 | if (!(r->crtype & SHADOW) && | |
95 | DOT(r->pert,r->pert) > FTINY*FTINY) { | |
96 | for (i = 0; i < 3; i++) /* perturb direction */ | |
97 | < | p.rdir[i] = r->rdir[i] - r->pert[i]/rindex; |
97 | > | p.rdir[i] = r->rdir[i] + |
98 | > | 2.*(1.-rindex)*r->pert[i]; |
99 | normalize(p.rdir); | |
100 | } else { | |
101 | VCOPY(p.rdir, r->rdir); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |