181 |
|
rayvalue(&lr); |
182 |
|
multcolor(lr.rcol, nd.scolor); |
183 |
|
addcolor(r->rcol, lr.rcol); |
184 |
– |
if (nd.rspec > 0.5 && m->omod == OVOID) |
185 |
– |
r->rt = r->rot + lr.rt; |
184 |
|
} |
185 |
|
} |
186 |
|
} |
195 |
|
if (nd.tspec > FTINY && nd.alpha2 <= FTINY) { |
196 |
|
RAY lr; |
197 |
|
if (rayorigin(&lr, r, TRANS, nd.tspec) == 0) { |
198 |
< |
VCOPY(lr.rdir, r->rdir); |
198 |
> |
for (i = 0; i < 3; i++) /* perturb direction */ |
199 |
> |
lr.rdir[i] = r->rdir[i] - .75*r->pert[i]; |
200 |
> |
normalize(lr.rdir); |
201 |
|
rayvalue(&lr); |
202 |
|
scalecolor(lr.rcol, nd.tspec); |
203 |
+ |
multcolor(lr.rcol, nd.mcolor); /* modified by color */ |
204 |
|
addcolor(r->rcol, lr.rcol); |
205 |
|
if (nd.tspec > .5) |
206 |
|
r->rt = r->rot + lr.rt; |