From dd79d1ce7847e7631ac56d28ca018c48bfae5af3 Mon Sep 17 00:00:00 2001 From: jfons Date: Sat, 6 Jun 2020 19:03:16 +0200 Subject: Upgrade OpenImageDenoise to v1.1.0 Upgrade OIDN to 1.1.0, the latest stable version that doesn't need the ISPC compiler. Documented the changes made during the removal of TBB and added a patch file for them. --- thirdparty/oidn/core/transfer_function.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'thirdparty/oidn/core/transfer_function.cpp') diff --git a/thirdparty/oidn/core/transfer_function.cpp b/thirdparty/oidn/core/transfer_function.cpp index a33e3c84bc..487f0a9f75 100644 --- a/thirdparty/oidn/core/transfer_function.cpp +++ b/thirdparty/oidn/core/transfer_function.cpp @@ -24,9 +24,12 @@ namespace oidn { float AutoexposureNode::autoexposure(const Image& color) { assert(color.format == Format::Float3); - return 1.0f; +// -- GODOT start -- +// We don't want to mess with TTB and we don't use autoexposure, so we disable this code +#if 0 +// -- GODOT end -- - /*constexpr float key = 0.18f; + constexpr float key = 0.18f; constexpr float eps = 1e-8f; constexpr int K = 16; // downsampling amount @@ -89,7 +92,11 @@ namespace oidn { tbb::static_partitioner() ); - return (sum.second > 0) ? (key / exp2(sum.first / float(sum.second))) : 1.f;*/ + return (sum.second > 0) ? (key / exp2(sum.first / float(sum.second))) : 1.f; +// -- GODOT start -- +#endif + return 1.0; +// -- GODOT end -- } } // namespace oidn -- cgit v1.2.3