237 |
|
if ((vsrc[2] > 0) ^ (ndp->vray[2] > 0) && bright(ndp->cthru) > FTINY) { |
238 |
|
double dx = vsrc[0] + ndp->vray[0]; |
239 |
|
double dy = vsrc[1] + ndp->vray[1]; |
240 |
< |
if (dx*dx + dy*dy <= (4./PI)*(omega + tomega + |
240 |
> |
if (dx*dx + dy*dy <= (1.5*4./PI)*(omega + tomega + |
241 |
|
2.*sqrt(omega*tomega))) |
242 |
|
return(0); |
243 |
|
} |
442 |
|
sample_sdcomp(BSDFDAT *ndp, SDComponent *dcp, int xmit) |
443 |
|
{ |
444 |
|
const int hasthru = (xmit && |
445 |
< |
!(ndp->pr->crtype & (SPECULAR|AMBIENT)) && |
446 |
< |
bright(ndp->cthru) > FTINY); |
445 |
> |
!(ndp->pr->crtype & (SPECULAR|AMBIENT)) |
446 |
> |
&& bright(ndp->cthru) > FTINY); |
447 |
|
int nstarget = 1; |
448 |
|
int nsent = 0; |
449 |
|
int n; |
508 |
|
static int |
509 |
|
sample_sdf(BSDFDAT *ndp, int sflags) |
510 |
|
{ |
511 |
< |
int hasthru = (sflags == SDsampSpT |
512 |
< |
&& !(ndp->pr->crtype & (SPECULAR|AMBIENT)) |
513 |
< |
&& bright(ndp->cthru) > FTINY); |
511 |
> |
int hasthru = (sflags == SDsampSpT && |
512 |
> |
!(ndp->pr->crtype & (SPECULAR|AMBIENT)) |
513 |
> |
&& bright(ndp->cthru) > FTINY); |
514 |
|
int n, ntotal = 0; |
515 |
|
double b = 0; |
516 |
|
SDSpectralDF *dfp; |
676 |
|
if (r->crtype & SHADOW) { |
677 |
|
RAY tr; /* attempt to pass shadow ray */ |
678 |
|
if (rayorigin(&tr, TRANS, r, nd.cthru) < 0) |
679 |
< |
return(1); /* blocked */ |
679 |
> |
return(1); /* no through component */ |
680 |
|
VCOPY(tr.rdir, r->rdir); |
681 |
|
rayvalue(&tr); /* transmit with scaling */ |
682 |
|
multcolor(tr.rcol, tr.rcoef); |