66 |
|
if (m->oargs.nfargs != (m->otype==MAT_DIELECTRIC ? 5 : 8)) |
67 |
|
objerror(m, USER, "bad arguments"); |
68 |
|
|
69 |
+ |
r->rt = r->rot; /* just use ray length */ |
70 |
+ |
|
71 |
|
raytexture(r, m->omod); /* get modifiers */ |
72 |
|
|
73 |
|
cos1 = raynormal(dnorm, r); /* cosine of theta1 */ |
94 |
|
else |
95 |
|
setcolor(mcolor, 1.0, 1.0, 1.0); |
96 |
|
} |
97 |
< |
mabsorp = intens(mcolor); |
97 |
> |
mabsorp = bright(mcolor); |
98 |
|
|
99 |
|
d2 = 1.0 - nratio*nratio*(1.0 - cos1*cos1); /* compute cos theta2 */ |
100 |
|
|
129 |
|
if (m->otype != MAT_DIELECTRIC |
130 |
|
|| r->rod > 0.0 |
131 |
|
|| r->crtype & SHADOW |
132 |
+ |
|| directinvis |
133 |
|
|| m->oargs.farg[4] == 0.0 |
134 |
|
|| !disperse(m, r, p.rdir, trans)) |
135 |
|
#endif |
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 |
|
/* |