From fd7baedcdc7ed2faf0ca83f9236322f343124873 Mon Sep 17 00:00:00 2001 From: Ben Doherty Date: Mon, 9 Feb 2026 10:36:17 -0800 Subject: [PATCH] Changes necessary for GCC (#9672) --- filament/src/ToneMapper.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/filament/src/ToneMapper.cpp b/filament/src/ToneMapper.cpp index a16acea83d..051dc6c3df 100644 --- a/filament/src/ToneMapper.cpp +++ b/filament/src/ToneMapper.cpp @@ -21,6 +21,8 @@ #include #include +#include + namespace filament { using namespace math; @@ -320,10 +322,10 @@ public: const float weightToe = 1.0f - weightLinear; // Shoulder mapping for highlights. - const float shoulder = mKa + mKb * std::expf(x * mKc); + const float shoulder = mKa + mKb * expf(x * mKc); if (x < mLinearSection * mPeakIntensity) { - const float toeMapped = mMidPoint * std::powf(x / mMidPoint, mToeStrength); + const float toeMapped = mMidPoint * powf(x / mMidPoint, mToeStrength); return weightToe * toeMapped + weightLinear * x; } return shoulder; @@ -345,7 +347,7 @@ public: // Pre-compute constants for the shoulder region. const float k = (mLinearSection - 1.0f) / (mAlpha - 1.0f); mKa = mPeakIntensity * mLinearSection + mPeakIntensity * k; - mKb = -mPeakIntensity * k * std::expf(mLinearSection / k); + mKb = -mPeakIntensity * k * expf(mLinearSection / k); mKc = -1.0f / (k * mPeakIntensity); }