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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-04-16 15:49:39 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-04-16 17:28:24 +0400
commiteecc426d863d4a744ec97e36caf358cc9bc65422 (patch)
tree973813652d0d6fe6b0d9ce13b415879e743f8867
parent7d45ddae33f41578e07970c95bac5f916819e27d (diff)
Fix cycles standalone file saving not taking number of samples into account properly.
-rw-r--r--intern/cycles/render/session.cpp12
-rw-r--r--intern/cycles/render/session.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index fec49390dde..9cf7f49754c 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -102,7 +102,7 @@ Session::~Session()
display = new DisplayBuffer(device, false);
display->reset(device, buffers->params);
- tonemap();
+ tonemap(params.samples);
progress.set_status("Writing Image", params.output_path);
display->write(device, params.output_path);
@@ -172,7 +172,7 @@ bool Session::draw_gpu(BufferParams& buffer_params, DeviceDrawParams& draw_param
* only access GL buffers from the main thread */
if(gpu_need_tonemap) {
thread_scoped_lock buffers_lock(buffers_mutex);
- tonemap();
+ tonemap(tile_manager.state.sample);
gpu_need_tonemap = false;
gpu_need_tonemap_cond.notify_all();
}
@@ -574,8 +574,8 @@ void Session::run_cpu()
}
else if(need_tonemap) {
/* tonemap only if we do not reset, we don't we don't
- * want to show the result of an incomplete sample*/
- tonemap();
+ * want to show the result of an incomplete sample */
+ tonemap(tile_manager.state.sample);
}
if(!device->error_message().empty())
@@ -841,7 +841,7 @@ void Session::path_trace()
device->task_add(task);
}
-void Session::tonemap()
+void Session::tonemap(int sample)
{
/* add tonemap task */
DeviceTask task(DeviceTask::FILM_CONVERT);
@@ -853,7 +853,7 @@ void Session::tonemap()
task.rgba_byte = display->rgba_byte.device_pointer;
task.rgba_half = display->rgba_half.device_pointer;
task.buffer = buffers->buffer.device_pointer;
- task.sample = tile_manager.state.sample;
+ task.sample = sample;
tile_manager.state.buffer.get_offset_stride(task.offset, task.stride);
if(task.w > 0 && task.h > 0) {
diff --git a/intern/cycles/render/session.h b/intern/cycles/render/session.h
index e2a7076f250..8c597c431bb 100644
--- a/intern/cycles/render/session.h
+++ b/intern/cycles/render/session.h
@@ -150,7 +150,7 @@ protected:
void update_scene();
void update_status_time(bool show_pause = false, bool show_done = false);
- void tonemap();
+ void tonemap(int sample);
void path_trace();
void reset_(BufferParams& params, int samples);