Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/render')
-rw-r--r--intern/cycles/render/buffers.cpp30
-rw-r--r--intern/cycles/render/session.cpp5
-rw-r--r--intern/cycles/render/session.h2
3 files changed, 28 insertions, 9 deletions
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index fe8606e1939..50308d0d377 100644
--- a/intern/cycles/render/buffers.cpp
+++ b/intern/cycles/render/buffers.cpp
@@ -55,7 +55,10 @@ bool BufferParams::modified(const BufferParams &params)
{
return !(full_x == params.full_x && full_y == params.full_y && width == params.width &&
height == params.height && full_width == params.full_width &&
- full_height == params.full_height && Pass::equals(passes, params.passes));
+ full_height == params.full_height && Pass::equals(passes, params.passes) &&
+ denoising_data_pass == params.denoising_data_pass &&
+ denoising_clean_pass == params.denoising_clean_pass &&
+ denoising_prefiltered_pass == params.denoising_prefiltered_pass);
}
int BufferParams::get_passes_size()
@@ -183,13 +186,28 @@ bool RenderBuffers::get_denoising_pass_rect(
offset = type + params.get_denoising_offset();
scale /= sample;
}
- else if (type == DENOISING_PASS_PREFILTERED_COLOR && !params.denoising_prefiltered_pass) {
- /* If we're not saving the prefiltering result, return the original noisy pass. */
- offset = params.get_denoising_offset() + DENOISING_PASS_COLOR;
- scale /= sample;
+ else if (params.denoising_prefiltered_pass) {
+ offset = type + params.get_denoising_prefiltered_offset();
}
else {
- offset = type + params.get_denoising_prefiltered_offset();
+ switch (type) {
+ case DENOISING_PASS_PREFILTERED_DEPTH:
+ offset = params.get_denoising_offset() + DENOISING_PASS_DEPTH;
+ break;
+ case DENOISING_PASS_PREFILTERED_NORMAL:
+ offset = params.get_denoising_offset() + DENOISING_PASS_NORMAL;
+ break;
+ case DENOISING_PASS_PREFILTERED_ALBEDO:
+ offset = params.get_denoising_offset() + DENOISING_PASS_ALBEDO;
+ break;
+ case DENOISING_PASS_PREFILTERED_COLOR:
+ /* If we're not saving the prefiltering result, return the original noisy pass. */
+ offset = params.get_denoising_offset() + DENOISING_PASS_COLOR;
+ break;
+ default:
+ return false;
+ }
+ scale /= sample;
}
int pass_stride = params.get_passes_size();
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index 7a894c1e98a..c77a20787f5 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -285,9 +285,7 @@ void Session::run_gpu()
if (progress.get_cancel())
break;
- }
- if (!no_tiles) {
/* buffers mutex is locked entirely while rendering each
* sample, and released/reacquired on each iteration to allow
* reset and draw in between */
@@ -978,7 +976,7 @@ void Session::update_status_time(bool show_pause, bool show_done)
*/
substatus += string_printf(", Sample %d/%d", progress.get_current_sample(), num_samples);
}
- if (params.full_denoising) {
+ if (params.full_denoising || params.optix_denoising) {
substatus += string_printf(", Denoised %d tiles", progress.get_denoised_tiles());
}
else if (params.run_denoising) {
@@ -1038,6 +1036,7 @@ void Session::render()
task.denoising_from_render = true;
task.denoising_do_filter = params.full_denoising;
+ task.denoising_use_optix = params.optix_denoising;
task.denoising_write_passes = params.write_denoising_passes;
}
diff --git a/intern/cycles/render/session.h b/intern/cycles/render/session.h
index 9fffc13dd41..ec465601541 100644
--- a/intern/cycles/render/session.h
+++ b/intern/cycles/render/session.h
@@ -63,6 +63,7 @@ class SessionParams {
bool run_denoising;
bool write_denoising_passes;
bool full_denoising;
+ bool optix_denoising;
DenoiseParams denoising;
double cancel_timeout;
@@ -92,6 +93,7 @@ class SessionParams {
run_denoising = false;
write_denoising_passes = false;
full_denoising = false;
+ optix_denoising = false;
display_buffer_linear = false;