| 422 |
|
c_cmaterial->rs + c_cmaterial->ts; |
| 423 |
|
if (d <= 0. | d >= 1.) |
| 424 |
|
return(NULL); |
| 425 |
< |
if (c_cmaterial->td > .01 || c_cmaterial->ts > .01) { /* trans */ |
| 425 |
> |
/* check for trans */ |
| 426 |
> |
if (c_cmaterial->td > .01 || c_cmaterial->ts > .01) { |
| 427 |
|
double ts, a5, a6; |
| 428 |
|
|
| 429 |
|
ts = sqrt(c_cmaterial->ts); /* because we use 2 sides */ |
| 451 |
|
ts/(ts + c_cmaterial->td)); |
| 452 |
|
return(mname); |
| 453 |
|
} |
| 454 |
< |
if (c_cmaterial->rs < .01 || isgrey(&c_cmaterial->rs_c)) { /* plastic */ |
| 454 |
> |
/* check for plastic */ |
| 455 |
> |
if (c_cmaterial->rs < .01 || c_isgrey(&c_cmaterial->rs_c)) { |
| 456 |
|
if (c_cmaterial->rs > .999) |
| 457 |
|
cvtcolor(radrgb, &c_cmaterial->rd_c, 1.); |
| 458 |
|
else |