summaryrefslogtreecommitdiff
path: root/thirdparty/oidn/core/transfer_function.cpp
diff options
context:
space:
mode:
authorjfons <joan.fonssanchez@gmail.com>2020-06-06 19:03:16 +0200
committerjfons <joan.fonssanchez@gmail.com>2020-06-06 19:03:16 +0200
commitdd79d1ce7847e7631ac56d28ca018c48bfae5af3 (patch)
tree71ff39b3c4da1710d0eef35b84e00ce8050611a7 /thirdparty/oidn/core/transfer_function.cpp
parentdc67d0737b86c7a6cab66752b96631c59c703997 (diff)
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.
Diffstat (limited to 'thirdparty/oidn/core/transfer_function.cpp')
-rw-r--r--thirdparty/oidn/core/transfer_function.cpp13
1 files changed, 10 insertions, 3 deletions
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