188 |
|
objerror(m, USER, "bad number of arguments"); |
189 |
|
/* check for back side */ |
190 |
|
if (r->rod < 0.0) { |
191 |
< |
if (!backvis && m->otype != MAT_TRANS) { |
191 |
> |
if (!backvis) { |
192 |
|
raytrans(r); |
193 |
|
return(1); |
194 |
|
} |
239 |
|
if (!(nd.specfl & SP_PURE) && |
240 |
|
specthresh >= nd.tspec-FTINY) |
241 |
|
nd.specfl |= SP_TBLT; |
242 |
< |
if (!hastexture || r->crtype & SHADOW) { |
242 |
> |
if (!hastexture || r->crtype & (SHADOW|AMBIENT)) { |
243 |
|
VCOPY(nd.prdir, r->rdir); |
244 |
|
transtest = 2; |
245 |
|
} else { |
282 |
|
} else if (fest > FTINY) { |
283 |
|
d = m->oargs.farg[3]*(1. - fest); |
284 |
|
for (i = 0; i < 3; i++) |
285 |
< |
nd.scolor[i] = fest + nd.mcolor[i]*d; |
285 |
> |
colval(nd.scolor,i) = fest + |
286 |
> |
colval(nd.mcolor,i)*d; |
287 |
|
} else { |
288 |
|
copycolor(nd.scolor, nd.mcolor); |
289 |
|
scalecolor(nd.scolor, nd.rspec); |
306 |
|
rayvalue(&lr); |
307 |
|
multcolor(lr.rcol, lr.rcoef); |
308 |
|
addcolor(r->rcol, lr.rcol); |
309 |
< |
if (!hastexture && nd.specfl & SP_FLAT) { |
309 |
> |
if (nd.specfl & SP_FLAT && |
310 |
> |
!hastexture | (r->crtype & AMBIENT)) { |
311 |
|
mirtest = 2.*bright(lr.rcol); |
312 |
|
mirdist = r->rot + lr.rt; |
313 |
|
} |