Skip to content

Commit 5b5e312

Browse files
committed
Fixed bug in media photons.
1 parent 6211eee commit 5b5e312

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

source/base/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#define OFFICIAL_VERSION_STRING "3.7.1"
4646
#define OFFICIAL_VERSION_NUMBER 371
4747

48-
#define POV_RAY_PRERELEASE "alpha.8498421"
48+
#define POV_RAY_PRERELEASE "alpha.8499454"
4949

5050
#if (POV_RAY_IS_AUTOBUILD == 1) && ((POV_RAY_IS_OFFICIAL == 1) || (POV_RAY_IS_SEMI_OFFICIAL == 1))
5151
#ifdef POV_RAY_PRERELEASE

source/core/lighting/photons.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,10 @@ void PhotonMediaFunction::DepositMediaPhotons(MathColour& colour, MediaVector& m
11691169
{
11701170
// Add optical depth of current interval.
11711171

1172-
Od += (*i).od / (DBL)(*i).samples;
1172+
if ((*i).samples > 0)
1173+
Od += (*i).od / (DBL)(*i).samples;
1174+
else
1175+
POV_ASSERT((*i).od.IsZero());
11731176
}
11741177

11751178
// Add contribution estimated for the participating media.

unix/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.1-alpha.8498421
1+
3.7.1-alpha.8499454

0 commit comments

Comments
 (0)