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

Fix false colors not being applied to all tiles on a final render #2880

Closed
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ RenderingManager::RenderingManager(StatusBar& status_bar)
//
// They are using a queued connection because the emitting thread is different from
// the receiving thread (the emitting thread is the master renderer thread, and the
// receiving thread is the UI thread of the main window (presumably).
// receiving thread is the UI thread of the main window (presumably)).
//
// They are using a blocking queue connection because we need the receiving slot to
// have returned in the receiving thread before the emitting thread can continue.
Expand Down
26 changes: 12 additions & 14 deletions src/appleseed/renderer/kernel/rendering/masterrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,26 @@ struct MasterRenderer::Impl

try
{
IRendererController& controller =
m_serial_renderer_controller != nullptr
? *m_serial_renderer_controller
: renderer_controller;

// Render.
result.m_status =
do_render(
m_serial_renderer_controller != nullptr
? *m_serial_renderer_controller
: renderer_controller);
result.m_status = do_render(controller);

// Retrieve frame's render info. Note that the frame entity may have been replaced during rendering.
ParamArray& render_info = m_project.get_frame()->render_info();

// Insert rendering time into frame's render info.
render_info.insert("render_time", m_project.get_rendering_timer().get_seconds());

// Don't proceed further if rendering failed.
// Don't proceed further if rendering failed or aborted.
if (result.m_status != RenderingResult::Succeeded)
{
controller.on_rendering_abort();
return result;
}

// Post-process.
RenderingTimer stopwatch;
Expand All @@ -236,6 +240,8 @@ struct MasterRenderer::Impl

// Insert post-processing time into frame's render info.
render_info.insert("post_processing_time", stopwatch.get_seconds());

controller.on_rendering_success();
}
catch (const std::bad_alloc&)
{
Expand Down Expand Up @@ -297,28 +303,20 @@ struct MasterRenderer::Impl

// Expand procedural assemblies before scene entities inputs are bound.
if (!m_project.get_scene()->expand_procedural_assemblies(m_project, &abort_switch))
{
renderer_controller.on_rendering_abort();
return RenderingResult::Aborted;
}

// Bind scene entities inputs.
if (!bind_scene_entities_inputs())
{
renderer_controller.on_rendering_abort();
return RenderingResult::Aborted;
}

const IRendererController::Status status = initialize_and_render_frame(renderer_controller);

switch (status)
{
case IRendererController::TerminateRendering:
renderer_controller.on_rendering_success();
return RenderingResult::Succeeded;

case IRendererController::AbortRendering:
renderer_controller.on_rendering_abort();
return RenderingResult::Aborted;

case IRendererController::ReinitializeRendering:
Expand Down