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:
authorSergey Sharybin <sergey@blender.org>2021-09-22 14:05:09 +0300
committerSergey Sharybin <sergey@blender.org>2021-09-22 16:07:55 +0300
commit9f6313498a0af386f08ed17c83bf33b8c2c3b5b3 (patch)
treee8a2c08e58108855533b29bcffe7bb7e3fa7e0fd /intern/cycles
parentf7a492d460543fd42386cb0c941d247ea902f290 (diff)
Fix missing samples count pass when using tiles
Samples count pass is normalized to the overall number of samples. This means that we need to store actual value of the samples in the tile buffer file. A bit annoying to pull all those settings to BufferParams and need to find a more generic solution, but for now this is easiest and a quickest solution. Differential Revision: https://developer.blender.org/D12597
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/integrator/path_trace.cpp5
-rw-r--r--intern/cycles/render/buffers.cpp1
-rw-r--r--intern/cycles/render/buffers.h1
-rw-r--r--intern/cycles/render/session.cpp1
4 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/integrator/path_trace.cpp b/intern/cycles/integrator/path_trace.cpp
index bc43747718d..b62a06aea43 100644
--- a/intern/cycles/integrator/path_trace.cpp
+++ b/intern/cycles/integrator/path_trace.cpp
@@ -933,10 +933,7 @@ void PathTrace::process_full_buffer_from_disk(string_view filename)
int PathTrace::get_num_render_tile_samples() const
{
if (full_frame_state_.render_buffers) {
- /* If the full-frame buffer is read from disk the number of samples is not used as there is a
- * sample count pass for that in the buffer. Just avoid access to badly defined state of the
- * path state. */
- return 0;
+ return full_frame_state_.render_buffers->params.samples;
}
return render_scheduler_.get_num_rendered_samples();
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index 186699596ac..1882510cd70 100644
--- a/intern/cycles/render/buffers.cpp
+++ b/intern/cycles/render/buffers.cpp
@@ -105,6 +105,7 @@ NODE_DEFINE(BufferParams)
SOCKET_STRING(layer, "Layer", ustring());
SOCKET_STRING(view, "View", ustring());
+ SOCKET_INT(samples, "Samples", 0);
SOCKET_FLOAT(exposure, "Exposure", 1.0f);
SOCKET_BOOLEAN(use_approximate_shadow_catcher, "Use Approximate Shadow Catcher", false);
SOCKET_BOOLEAN(use_transparent_background, "Transparent Background", false);
diff --git a/intern/cycles/render/buffers.h b/intern/cycles/render/buffers.h
index a07e7289566..184ac7197af 100644
--- a/intern/cycles/render/buffers.h
+++ b/intern/cycles/render/buffers.h
@@ -98,6 +98,7 @@ class BufferParams : public Node {
vector<BufferPass> passes;
ustring layer;
ustring view;
+ int samples = 0;
float exposure = 1.0f;
bool use_approximate_shadow_catcher = false;
bool use_transparent_background = false;
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index c39232be2b0..47eeffd97fe 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -407,6 +407,7 @@ void Session::do_delayed_reset()
buffer_params_ = delayed_reset_.buffer_params;
/* Store parameters used for buffers access outside of scene graph. */
+ buffer_params_.samples = params.samples;
buffer_params_.exposure = scene->film->get_exposure();
buffer_params_.use_approximate_shadow_catcher =
scene->film->get_use_approximate_shadow_catcher();