--- ray/src/rt/pmcontrib2.c 2018/02/09 14:59:08 2.4 +++ ray/src/rt/pmcontrib2.c 2023/11/19 00:43:00 2.6 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pmcontrib2.c,v 2.4 2018/02/09 14:59:08 rschregle Exp $"; +static const char RCSid[] = "$Id: pmcontrib2.c,v 2.6 2023/11/19 00:43:00 greg Exp $"; #endif /* @@ -11,7 +11,7 @@ static const char RCSid[] = "$Id: pmcontrib2.c,v 2.4 2 supported by the Swiss National Science Foundation (SNSF, #147053) ====================================================================== - $Id: pmcontrib2.c,v 2.4 2018/02/09 14:59:08 rschregle Exp $ + $Id: pmcontrib2.c,v 2.6 2023/11/19 00:43:00 greg Exp $ */ @@ -23,9 +23,9 @@ static const char RCSid[] = "$Id: pmcontrib2.c,v 2.4 2 #include "pmapdiag.h" #include "rcontrib.h" #include "otypes.h" +#include "otspecial.h" - static void setPmapContribParams (PhotonMap *pmap, LUTAB *srcContrib) /* Set parameters for light source contributions */ { @@ -108,7 +108,7 @@ void photonContrib (PhotonMap *pmap, RAY *ray, COLOR i unsigned i; PhotonSearchQueueNode *sqn; float r2, invArea; - RREAL rayCoeff [3]; + SCOLOR rayCoeff; Photon *photon; static char warnPos = 1, warnDir = 1; @@ -238,8 +238,8 @@ void photonContrib (PhotonMap *pmap, RAY *ray, COLOR i flux [j] = ray -> rcol [j] ? flux [j] / ray -> rcol [j] : 0; } - multcolor(flux, rayCoeff); - addcolor(srcContrib -> cbin [srcBin], flux); + multscolor(flux, rayCoeff); + saddcolor(mcbin(srcContrib,srcBin), flux); } }