92 |
|
else |
93 |
|
setcolor(mcolor, 1.0, 1.0, 1.0); |
94 |
|
} |
95 |
< |
mabsorp = intens(mcolor); |
95 |
> |
mabsorp = bright(mcolor); |
96 |
|
|
97 |
|
d2 = 1.0 - nratio*nratio*(1.0 - cos1*cos1); /* compute cos theta2 */ |
98 |
|
|
135 |
|
multcolor(mcolor, r->pcol); /* modify */ |
136 |
|
scalecolor(p.rcol, trans); |
137 |
|
addcolor(r->rcol, p.rcol); |
138 |
+ |
r->rt = r->rot + p.rt; |
139 |
|
} |
140 |
|
} |
141 |
|
} |
151 |
|
|
152 |
|
scalecolor(p.rcol, refl); /* color contribution */ |
153 |
|
addcolor(r->rcol, p.rcol); |
154 |
+ |
if (refl > trans) |
155 |
+ |
r->rt = r->rot + p.rt; |
156 |
|
} |
157 |
|
|
158 |
|
multcolor(r->rcol, mcolor); /* multiply by transmittance */ |
256 |
|
/* trace source ray */ |
257 |
|
normalize(sray.rdir); |
258 |
|
rayvalue(&sray); |
259 |
< |
if (intens(sray.rcol) <= FTINY) /* missed it */ |
259 |
> |
if (bright(sray.rcol) <= FTINY) /* missed it */ |
260 |
|
continue; |
261 |
|
|
262 |
|
/* |