219 |
|
RAY *r |
220 |
|
) |
221 |
|
{ |
222 |
< |
if (ofun[m->otype].flags & (T_M|T_X) && m->otype != MAT_CLIP) { |
223 |
< |
if (istransp(m->otype) || isBSDFproxy(m)) { |
222 |
> |
if (m->otype != MAT_CLIP && ismaterial(m->otype)) { |
223 |
> |
if (istransp(m) || isBSDFproxy(m)) { |
224 |
|
raytrans(r); |
225 |
|
return(1); |
226 |
|
} |
461 |
|
return(r->rod); |
462 |
|
} |
463 |
|
newdot = -DOT(norm, r->rdir); |
464 |
< |
if ((newdot > 0.0) != (r->rod > 0.0)) { /* fix orientation */ |
464 |
> |
if ((newdot > 0.0) ^ (r->rod > 0.0)) { /* fix orientation */ |
465 |
|
for (i = 0; i < 3; i++) |
466 |
|
norm[i] += 2.0*newdot*r->rdir[i]; |
467 |
|
newdot = -newdot; |
550 |
|
return(1); /* old has material, new does not */ |
551 |
|
} else if (mray == NULL) { |
552 |
|
return(0); /* new has material, old does not */ |
553 |
< |
} else if (istransp(mnew->otype)) { |
554 |
< |
if (!istransp(mray->otype)) |
553 |
> |
} else if (istransp(mnew)) { |
554 |
> |
if (!istransp(mray)) |
555 |
|
return(1); /* new is transparent, old is not */ |
556 |
< |
} else if (istransp(mray->otype)) { |
556 |
> |
} else if (istransp(mray)) { |
557 |
|
return(0); /* old is transparent, new is not */ |
558 |
|
} |
559 |
|
if (rod <= 0) { /* check which side we hit */ |