summarylogtreecommitdiffstats
path: root/denoise.patch
blob: 5b3048b917869a2152308d2fff5ac643506abfe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/draw/viewport.py b/draw/viewport.py
index a28cf9f..f7fd34c 100644
--- a/draw/viewport.py
+++ b/draw/viewport.py
@@ -8,6 +8,7 @@ import tempfile
 from ..bin import pyluxcore
 from .. import utils
 from ..utils import pfm
+from shutil import which
 
 NULL = 0
 
@@ -72,8 +73,7 @@ class FrameBuffer(object):
         self._albedo_file_path = self._make_denoiser_filepath("albedo")
         self._normal_file_path = self._make_denoiser_filepath("normal")
         self._denoised_file_path = self._make_denoiser_filepath("denoised")
-        current_dir = os.path.dirname(os.path.realpath(__file__))
-        self._denoiser_path = os.path.join(os.path.dirname(current_dir), "bin", "denoise")
+        self._denoiser_path = which('oidnDenoise')
         if platform.system() == "Windows":
             self._denoiser_path += ".exe"
         self._denoiser_process = None