From 36b87cc91844d2689bf860669d6d93741856a48a Mon Sep 17 00:00:00 2001 From: Rodney Date: Jun 25 2021 11:14:50 +0000 Subject: Merge pull request #3993 from shun-iwasawa/g/quick_fix_bokeh_fx Bokeh Advanced Fx Quick Fix --- diff --git a/toonz/sources/stdfx/iwa_bokeh_util.cpp b/toonz/sources/stdfx/iwa_bokeh_util.cpp index e27089d..451efb9 100644 --- a/toonz/sources/stdfx/iwa_bokeh_util.cpp +++ b/toonz/sources/stdfx/iwa_bokeh_util.cpp @@ -1102,9 +1102,9 @@ void BokehUtils::interpolateExposureAndConvertToRGB( // convert exposure by layer hardness if (layerHardnessRatio != 1.0) { - result.x = std::pow(result.x, layerHardnessRatio); - result.y = std::pow(result.y, layerHardnessRatio); - result.z = std::pow(result.z, layerHardnessRatio); + result.x = std::pow(result.x / result.w, layerHardnessRatio) * result.w; + result.y = std::pow(result.y / result.w, layerHardnessRatio) * result.w; + result.z = std::pow(result.z / result.w, layerHardnessRatio) * result.w; } // in case the result is replaced by the upper layer pixel