Skip to content

Commit c251d4d

Browse files
committed
denoiser_hook fix to work with paths that contain spaces
1 parent 769598f commit c251d4d

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

examples_tests/22.RaytracedAO/denoiser_hook.bat

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,28 @@ if NOT EXIST %denoiser_dir%/denoisertonemapper.exe (
1111
REM 1.ColorFile 2.AlbedoFile 3.NormalFile 4.BloomPsfFilePath(STRING) 5.BloomScale(FLOAT) 6.BloomIntensity(FLOAT) 7.TonemapperArgs(STRING)
1212
call :denoise %1 %2 %3 %4 %5 %6 %7
1313

14+
1415
EXIT /B %ERRORLEVEL%
1516

1617
:denoise
17-
if NOT EXIST %~dpn1.exr (
18-
echo BatchScriptError: Denoiser input file doesn't exist. ^(at %~dpn1.exr^)
18+
19+
set color_file="%~dpn1.exr"
20+
set albedo_file="%~dpn2.exr"
21+
set normal_file="%~dpn3.exr"
22+
set output_file="%~dpn1_denoised.exr"
23+
24+
if NOT EXIST %color_file% (
25+
echo BatchScriptError: Denoiser input file doesn't exist. ^(at %color_file%^)
1926
EXIT /B 0
2027
)
21-
if NOT EXIST %~dpn2.exr (
22-
echo BatchScriptError: Denoiser input file doesn't exist. ^(at %~dpn2.exr^)
28+
if NOT EXIST %albedo_file% (
29+
echo BatchScriptError: Denoiser input file doesn't exist. ^(at %albedo_file%^)
2330
EXIT /B 0
2431
)
25-
if NOT EXIST %~dpn3.exr (
26-
echo BatchScriptError: Denoiser input file doesn't exist. ^(at %~dpn3.exr^)
32+
if NOT EXIST %normal_file% (
33+
echo BatchScriptError: Denoiser input file doesn't exist. ^(at %normal_file%^)
2734
EXIT /B 0
2835
)
29-
set color_file=%~dpn1.exr
30-
set albedo_file=%~dpn2.exr
31-
set normal_file=%~dpn3.exr
32-
set output_file=%~dpn1_denoised.exr
3336
set bloom_file=%~f4
3437
set bloom_scale=%~5
3538
set bloom_intensity=%~6

0 commit comments

Comments
 (0)