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); |