Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tone mapping in CLI scene rendering #1242

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/yscene/yscene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ int run_render(const render_params& params_) {
auto image = params.denoise ? get_denoised(state) : get_render(state);
auto ext = "-s" + std::to_string(sample) + path_extension(params.output);
auto outfilename = replace_extension(params.output, ext);
auto ioerror = ""s;
if (!is_hdr_filename(params.output))
image = tonemap_image(image, params.exposure, params.filmic);
auto ioerror = ""s;
if (!save_image(outfilename, image, ioerror)) print_fatal(ioerror);
}
print_progress_next();
Expand All @@ -248,6 +250,8 @@ int run_render(const render_params& params_) {
// save image
print_progress_begin("save image");
auto image = params.denoise ? get_denoised(state) : get_render(state);
if (!is_hdr_filename(params.output))
image = tonemap_image(image, params.exposure, params.filmic);
if (!save_image(params.output, image, ioerror)) return print_fatal(ioerror);
print_progress_end();

Expand Down