272 |
|
agaussamp(r, &nd); |
273 |
|
|
274 |
|
if (nd.rdiff > FTINY) { /* ambient from this side */ |
275 |
< |
ambient(ctmp, r); |
275 |
> |
ambient(ctmp, r, nd.pnorm); |
276 |
|
if (nd.specfl & SP_RBLT) |
277 |
|
scalecolor(ctmp, 1.0-nd.trans); |
278 |
|
else |
281 |
|
addcolor(r->rcol, ctmp); /* add to returned color */ |
282 |
|
} |
283 |
|
if (nd.tdiff > FTINY) { /* ambient from other side */ |
284 |
+ |
FVECT bnorm; |
285 |
+ |
|
286 |
|
flipsurface(r); |
287 |
< |
ambient(ctmp, r); |
287 |
> |
bnorm[0] = -nd.pnorm[0]; |
288 |
> |
bnorm[1] = -nd.pnorm[1]; |
289 |
> |
bnorm[2] = -nd.pnorm[2]; |
290 |
> |
ambient(ctmp, r, bnorm); |
291 |
|
if (nd.specfl & SP_TBLT) |
292 |
|
scalecolor(ctmp, nd.trans); |
293 |
|
else |