129 |
|
register RAY *r; |
130 |
|
{ |
131 |
|
NORMDAT nd; |
132 |
– |
double ldot; |
133 |
– |
double omega; |
132 |
|
double dtmp; |
133 |
|
COLOR ctmp; |
134 |
|
register int i; |
154 |
|
raytexture(r, m->omod); |
155 |
|
nd.pdot = raynormal(nd.pnorm, r); /* perturb normal */ |
156 |
|
multcolor(nd.mcolor, r->pcol); /* modify material color */ |
157 |
+ |
r->rt = r->rot; /* default ray length */ |
158 |
|
/* get specular component */ |
159 |
|
nd.rspec = m->oargs.farg[3]; |
160 |
|
|
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; |
186 |
|
} |
187 |
|
} |
188 |
|
} |
201 |
|
rayvalue(&lr); |
202 |
|
scalecolor(lr.rcol, nd.tspec); |
203 |
|
addcolor(r->rcol, lr.rcol); |
204 |
+ |
if (nd.tspec > .5) |
205 |
+ |
r->rt = r->rot + lr.rt; |
206 |
|
} |
207 |
|
} |
208 |
|
if (r->crtype & SHADOW) /* the rest is shadow */ |