Skip to content

Commit 9716b39

Browse files
authored
Changes necessary for GCC (#9672)
1 parent ae9b951 commit 9716b39

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

filament/src/ToneMapper.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include <math/vec3.h>
2222
#include <math/scalar.h>
2323

24+
#include <cmath>
25+
2426
namespace filament {
2527

2628
using namespace math;
@@ -320,10 +322,10 @@ class GT7Curve {
320322
const float weightToe = 1.0f - weightLinear;
321323

322324
// Shoulder mapping for highlights.
323-
const float shoulder = mKa + mKb * std::expf(x * mKc);
325+
const float shoulder = mKa + mKb * expf(x * mKc);
324326

325327
if (x < mLinearSection * mPeakIntensity) {
326-
const float toeMapped = mMidPoint * std::powf(x / mMidPoint, mToeStrength);
328+
const float toeMapped = mMidPoint * powf(x / mMidPoint, mToeStrength);
327329
return weightToe * toeMapped + weightLinear * x;
328330
}
329331
return shoulder;
@@ -345,7 +347,7 @@ class GT7Curve {
345347
// Pre-compute constants for the shoulder region.
346348
const float k = (mLinearSection - 1.0f) / (mAlpha - 1.0f);
347349
mKa = mPeakIntensity * mLinearSection + mPeakIntensity * k;
348-
mKb = -mPeakIntensity * k * std::expf(mLinearSection / k);
350+
mKb = -mPeakIntensity * k * expf(mLinearSection / k);
349351
mKc = -1.0f / (k * mPeakIntensity);
350352
}
351353

0 commit comments

Comments
 (0)