Skip to content

Commit

Permalink
fix: added check for > 3 spectral samples with photon-mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregungory committed Mar 22, 2024
1 parent f6e823d commit 46d6f0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 6 additions & 2 deletions src/rt/pmapray.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static const char RCSid[] = "$Id: pmapray.c,v 2.7 2016/11/02 22:09:14 greg Exp $";
static const char RCSid[] = "$Id: pmapray.c,v 2.8 2024/03/22 16:54:16 greg Exp $";
#endif

/*
Expand All @@ -12,17 +12,21 @@ static const char RCSid[] = "$Id: pmapray.c,v 2.7 2016/11/02 22:09:14 greg Exp $
supported by the Swiss National Science Foundation (SNSF, #147053)
==================================================================
$Id: pmapray.c,v 2.7 2016/11/02 22:09:14 greg Exp $
$Id: pmapray.c,v 2.8 2024/03/22 16:54:16 greg Exp $
*/


#include "ray.h"
#include "pmapray.h"
#include "pmap.h"


void ray_init_pmap ()
/* Interface to ray_init(); init & load photon maps */
{
if (NCSAMP > 3 && photonMapping)
error(USER, "photon-mapping not currently supported for > 3 spectral samples");

loadPmaps(photonMaps, pmapParams);
}

Expand Down
8 changes: 3 additions & 5 deletions src/rt/pmapray.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* RCSid $Id: pmapray.h,v 2.6 2016/11/02 22:09:14 greg Exp $ */
/* RCSid $Id: pmapray.h,v 2.7 2024/03/22 16:54:16 greg Exp $ */

/*
==================================================================
Expand All @@ -10,12 +10,10 @@
supported by the Swiss National Science Foundation (SNSF, #147053)
==================================================================
$Id: pmapray.h,v 2.6 2016/11/02 22:09:14 greg Exp $
$Id: pmapray.h,v 2.7 2024/03/22 16:54:16 greg Exp $
*/


#include "ray.h"

/* Include after ray.h */

void ray_init_pmap ();
/* Interface to ray_init() and rtmain/rpmain/rvmain; init & load pmaps */
Expand Down

0 comments on commit 46d6f0b

Please sign in to comment.