Skip to content

Commit

Permalink
Fixed bug in media photons.
Browse files Browse the repository at this point in the history
  • Loading branch information
c-lipka committed Feb 28, 2016
1 parent 6211eee commit 5b5e312
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/base/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#define OFFICIAL_VERSION_STRING "3.7.1"
#define OFFICIAL_VERSION_NUMBER 371

#define POV_RAY_PRERELEASE "alpha.8498421"
#define POV_RAY_PRERELEASE "alpha.8499454"

#if (POV_RAY_IS_AUTOBUILD == 1) && ((POV_RAY_IS_OFFICIAL == 1) || (POV_RAY_IS_SEMI_OFFICIAL == 1))
#ifdef POV_RAY_PRERELEASE
Expand Down
5 changes: 4 additions & 1 deletion source/core/lighting/photons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,10 @@ void PhotonMediaFunction::DepositMediaPhotons(MathColour& colour, MediaVector& m
{
// Add optical depth of current interval.

Od += (*i).od / (DBL)(*i).samples;
if ((*i).samples > 0)
Od += (*i).od / (DBL)(*i).samples;
else
POV_ASSERT((*i).od.IsZero());
}

// Add contribution estimated for the participating media.
Expand Down
2 changes: 1 addition & 1 deletion unix/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.1-alpha.8498421
3.7.1-alpha.8499454

0 comments on commit 5b5e312

Please sign in to comment.