335 |
|
if ((nd.alpha2 *= nd.alpha2) <= FTINY) |
336 |
|
nd.specfl |= SP_PURE; |
337 |
|
|
338 |
– |
if (rayIn -> ro != NULL && isflat(rayIn -> ro -> otype)) |
339 |
– |
nd.specfl |= SP_FLAT; |
340 |
– |
|
338 |
|
/* Perturb normal */ |
339 |
|
if ((hastexture = (DOT(rayIn -> pert, rayIn -> pert) > sqr(FTINY)) )) |
340 |
|
nd.pdot = raynormal(nd.pnorm, rayIn); |
343 |
|
nd.pdot = rayIn -> rod; |
344 |
|
} |
345 |
|
|
346 |
< |
nd.pdot = max(nd.pdot, .001); |
346 |
> |
if (!hastexture && rayIn -> ro != NULL && isflat(rayIn -> ro -> otype)) |
347 |
> |
nd.specfl |= SP_FLAT; |
348 |
> |
|
349 |
> |
nd.pdot = max(nd.pdot, .001); |
350 |
|
|
351 |
|
/* Modify material color */ |
352 |
|
multcolor(nd.mcolor, rayIn -> pcol); |
497 |
|
for (i = 0; i < 3; i++) |
498 |
|
nd -> u [i] = evalue(mf -> ep [i]); |
499 |
|
|
500 |
< |
if (errno == EDOM || errno == ERANGE) |
500 |
> |
if ((errno == EDOM) | (errno == ERANGE)) |
501 |
|
nd -> u [0] = nd -> u [1] = nd -> u [2] = 0.0; |
502 |
|
|
503 |
|
if (mf -> fxp != &unitxf) |
1546 |
|
evalue(mf->ep[0]), evalue(mf->ep[1]), evalue(mf->ep[2])); |
1547 |
|
setcolor(tspecCol, |
1548 |
|
evalue(mf->ep[3]), evalue(mf->ep[4]), evalue(mf->ep[5])); |
1549 |
< |
if (errno == EDOM || errno == ERANGE) |
1549 |
> |
if ((errno == EDOM) | (errno == ERANGE)) |
1550 |
|
objerror(mat, WARNING, "compute error"); |
1551 |
|
else { |
1552 |
|
/* Set up probz */ |