290 |
|
gaussamp(r, &nd); |
291 |
|
|
292 |
|
if (nd.rdiff > FTINY) { /* ambient from this side */ |
293 |
< |
ambient(ctmp, r); |
293 |
> |
ambient(ctmp, r, hastexture?nd.pnorm:r->ron); |
294 |
|
if (nd.specfl & SP_RBLT) |
295 |
|
scalecolor(ctmp, 1.0-nd.trans); |
296 |
|
else |
300 |
|
} |
301 |
|
if (nd.tdiff > FTINY) { /* ambient from other side */ |
302 |
|
flipsurface(r); |
303 |
< |
ambient(ctmp, r); |
303 |
> |
if (hastexture) { |
304 |
> |
FVECT bnorm; |
305 |
> |
bnorm[0] = -nd.pnorm[0]; |
306 |
> |
bnorm[1] = -nd.pnorm[1]; |
307 |
> |
bnorm[2] = -nd.pnorm[2]; |
308 |
> |
ambient(ctmp, r, bnorm); |
309 |
> |
} else |
310 |
> |
ambient(ctmp, r, r->ron); |
311 |
|
if (nd.specfl & SP_TBLT) |
312 |
|
scalecolor(ctmp, nd.trans); |
313 |
|
else |