155 |
|
raytexture(r, m->omod); |
156 |
|
nd.pdot = raynormal(nd.pnorm, r); /* perturb normal */ |
157 |
|
multcolor(nd.mcolor, r->pcol); /* modify material color */ |
158 |
– |
r->rt = r->rot; /* default ray length */ |
158 |
|
transtest = 0; |
159 |
|
/* get specular component */ |
160 |
|
nd.rspec = m->oargs.farg[3]; |
196 |
|
if (nd.tspec > FTINY && nd.alpha2 <= FTINY) { |
197 |
|
RAY lr; |
198 |
|
if (rayorigin(&lr, r, TRANS, nd.tspec) == 0) { |
199 |
< |
if (DOT(r->pert,r->pert) > FTINY*FTINY) { |
199 |
> |
if (!(r->crtype & SHADOW) && |
200 |
> |
DOT(r->pert,r->pert) > FTINY*FTINY) { |
201 |
|
for (i = 0; i < 3; i++) /* perturb direction */ |
202 |
|
lr.rdir[i] = r->rdir[i] - |
203 |
|
.75*r->pert[i]; |
204 |
|
normalize(lr.rdir); |
205 |
< |
} else |
205 |
> |
} else { |
206 |
> |
VCOPY(lr.rdir, r->rdir); |
207 |
|
transtest = 2; |
208 |
+ |
} |
209 |
|
rayvalue(&lr); |
210 |
|
scalecolor(lr.rcol, nd.tspec); |
211 |
|
multcolor(lr.rcol, nd.mcolor); /* modified by color */ |