--- ray/src/rt/ambient.c 2017/01/27 22:00:49 2.104 +++ ray/src/rt/ambient.c 2018/01/09 05:01:15 2.105 @@ -1,4 +1,4 @@ -static const char RCSid[] = "$Id: ambient.c,v 2.104 2017/01/27 22:00:49 greg Exp $"; +static const char RCSid[] = "$Id: ambient.c,v 2.105 2018/01/09 05:01:15 greg Exp $"; /* * ambient.c - routines dealing with ambient (inter-reflected) component. * @@ -12,8 +12,10 @@ static const char RCSid[] = "$Id: ambient.c,v 2.104 20 #include "platform.h" #include "ray.h" #include "otypes.h" +#include "otspecial.h" #include "resolu.h" #include "ambient.h" +#include "source.h" #include "random.h" #include "pmapamb.h" @@ -415,7 +417,8 @@ plugaleak(RAY *r, AMBVAL *ap, FVECT anorm, double ang) VSUM(rtst.rdir, vdif, anorm, t[1]); /* further dist. > plane */ rtst.rmax = normalize(rtst.rdir); /* short ray test */ while (localhit(&rtst, &thescene)) { /* check for occluder */ - if (rtst.ro->omod != OVOID && + OBJREC *m = findmaterial(rtst.ro); + if (m != NULL && !istransp(m->otype) && !isBSDFproxy(m) && (rtst.clipset == NULL || !inset(rtst.clipset, rtst.ro->omod))) return(1); /* plug light leak */