mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 02:00:11 +00:00
Move screenshot pass out of basic_rendering, into normal_rendering
This fixes a bug with avrecorder capturing a mostly white frame at the beginning of a wipe. This was because wipe_capture_start_rendering depends on basic_rendering and a wipe could occur before any 2d elements are batched for the current frame, thus producing a white frame when basic_rendering is passed. It only lasted for one frame because the PREVIOUS frame is used for the wipe itself. This is also why the white frame was not visible on screen.
This commit is contained in:
parent
9eefb2e0ae
commit
8d25820c91
1 changed files with 6 additions and 10 deletions
|
|
@ -193,14 +193,16 @@ static InternalPassData build_pass_manager()
|
|||
);
|
||||
basic_rendering->insert("pp_final_simple_blit", pp_simple_blit_pass);
|
||||
|
||||
basic_rendering->insert(
|
||||
auto screenshot_rendering = std::make_shared<PassManager>();
|
||||
|
||||
screenshot_rendering->insert(
|
||||
"screenshot_prepare",
|
||||
[screenshot_pass, framebuffer_manager](PassManager&, Rhi&)
|
||||
{
|
||||
screenshot_pass->set_source(framebuffer_manager->current_post_color(), vid.width, vid.height);
|
||||
}
|
||||
);
|
||||
basic_rendering->insert("screenshot", screenshot_pass);
|
||||
screenshot_rendering->insert("screenshot", screenshot_pass);
|
||||
|
||||
// Composite-present takes the current postprocess result and outputs it to the default framebuffer.
|
||||
// It also renders imgui and presents the screen.
|
||||
|
|
@ -233,6 +235,7 @@ static InternalPassData build_pass_manager()
|
|||
|
||||
normal_rendering->insert("resource_manager", resource_manager);
|
||||
normal_rendering->insert("basic_rendering", basic_rendering);
|
||||
normal_rendering->insert("screenshot_rendering", screenshot_rendering);
|
||||
normal_rendering->insert("composite_present_rendering", composite_present_rendering);
|
||||
|
||||
// Wipe Start Screen Capture rendering
|
||||
|
|
@ -305,14 +308,7 @@ static InternalPassData build_pass_manager()
|
|||
}
|
||||
);
|
||||
wipe_rendering->insert("pp_final_wipe", pp_wipe_pass);
|
||||
wipe_rendering->insert(
|
||||
"screenshot_prepare",
|
||||
[screenshot_pass, framebuffer_manager](PassManager&, Rhi&)
|
||||
{
|
||||
screenshot_pass->set_source(framebuffer_manager->current_post_color(), vid.width, vid.height);
|
||||
}
|
||||
);
|
||||
wipe_rendering->insert("screenshot", screenshot_pass);
|
||||
wipe_rendering->insert("screenshot_rendering", screenshot_rendering);
|
||||
wipe_rendering->insert("composite_present_rendering", composite_present_rendering);
|
||||
|
||||
InternalPassData ret;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue