380 |
|
|
381 |
|
if (sflags == SDsampSpT) { |
382 |
|
unsc = ndp->tunsamp; |
383 |
< |
dfp = ndp->sd->tf; |
383 |
> |
if (ndp->pr->rod > 0) |
384 |
> |
dfp = (ndp->sd->tf != NULL) ? ndp->sd->tf : ndp->sd->tb; |
385 |
> |
else |
386 |
> |
dfp = (ndp->sd->tb != NULL) ? ndp->sd->tb : ndp->sd->tf; |
387 |
|
cvt_sdcolor(unsc, &ndp->sd->tLamb); |
388 |
|
} else /* sflags == SDsampSpR */ { |
389 |
|
unsc = ndp->runsamp; |
473 |
|
} else { |
474 |
|
if (m->oargs.nfargs < 6) { /* check invisible backside */ |
475 |
|
if (!backvis && (nd.sd->rb == NULL) & |
476 |
< |
(nd.sd->tf == NULL)) { |
476 |
> |
(nd.sd->tb == NULL)) { |
477 |
|
SDfreeCache(nd.sd); |
478 |
|
raytrans(r); |
479 |
|
return(1); |
570 |
|
flipsurface(r); |
571 |
|
} |
572 |
|
/* add direct component */ |
573 |
< |
if ((bright(nd.tdiff) <= FTINY) & (nd.sd->tf == NULL)) { |
573 |
> |
if ((bright(nd.tdiff) <= FTINY) & (nd.sd->tf == NULL) & |
574 |
> |
(nd.sd->tb == NULL)) { |
575 |
|
direct(r, dir_brdf, &nd); /* reflection only */ |
576 |
|
} else if (nd.thick == 0) { |
577 |
|
direct(r, dir_bsdf, &nd); /* thin surface scattering */ |