Move the offscreen scene target into the render graph #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The swapchain backbuffer is now rendered through
RenderGraph(engine/src/rendering/), but the offscreen scene target still does its own layout transitions andbeginRendering/endRenderinginApplication::Impl::run(engine/src/application.cpp). Move the scene target into the graph so every pass in a frame goes through it.Background
RenderGraphderives barriers and layout transitions from what each pass declares it does to an image (writeColor,sample,use), and begins/ends rendering for passes that write color attachments.Image::transitionLayoutnow uses the sameAccesstable (engine/src/rendering/access.hpp), so it no longer throws on unlisted layout pairs.application.cppstill callstransitionLayoutandbeginColorPassby hand, and the backbuffer pass has anif (!sceneTarget)branch to decide whether it also draws the scene.SceneRenderer(engine/src/scene_renderer.hpp) is an empty stub.render()does nothing.Proposal
SampledRead. A"scene"pass writes it; the"ui"pass callssample()on it andwriteColor()on the backbuffer.SceneRenderer::renderwithaddPasses(RenderGraph&, const Scene&, RenderTargetHandle)so the scene renderer registers its own passes.application.cppbranching.beginColorPassand the manualtransitionLayoutcalls inapplication.cpp.Open question: ImGui's reads are dynamic
Panels decide which targets they display during
panelRegistry.update, so the ui pass'ssample()list has to come from that. Options:panelRegistry.update.The first is needed once several panels can show different targets. Note ImGui's descriptor assumes
eShaderReadOnlyOptimal, which is whatAccess::SampledReadmaps to.Out of scope
Transient/aliased resources, pass culling and reordering, and depth attachments in
PassBuilder. Revisit once there are more passes.