277 |
|
|
278 |
|
if (nd.rdiff > FTINY) { /* ambient from this side */ |
279 |
|
copycolor(ctmp, nd.mcolor); /* modified by material color */ |
280 |
< |
if (nd.specfl & SP_RBLT) |
281 |
< |
scalecolor(ctmp, 1.0-nd.trans); |
282 |
< |
else |
283 |
< |
scalecolor(ctmp, nd.rdiff); |
280 |
> |
scalecolor(ctmp, nd.rdiff); |
281 |
> |
if (nd.specfl & SP_RBLT) /* add in specular as well? */ |
282 |
> |
addcolor(ctmp, nd.scolor); |
283 |
|
multambient(ctmp, r, nd.pnorm); |
284 |
|
addcolor(r->rcol, ctmp); /* add to returned color */ |
285 |
|
} |
325 |
|
np->specfl |= SP_BADU; |
326 |
|
return; |
327 |
|
} |
328 |
< |
if (mf->f != &unitxf) |
329 |
< |
multv3(np->u, np->u, mf->f->xfm); |
328 |
> |
if (mf->fxp != &unitxf) |
329 |
> |
multv3(np->u, np->u, mf->fxp->xfm); |
330 |
|
fcross(np->v, np->pnorm, np->u); |
331 |
|
if (normalize(np->v) == 0.0) { |
332 |
|
objerror(np->mp, WARNING, "illegal orientation vector"); |