I have another question: Sometimes you want to have the intermediate results of a render path visualised. So for example I do deferred rendering and I want to look how my gbuffer or my shadow maps look like. Is there any special functionality in the RenderView to make this easy? I mean you could set up a RenderView for each of the intermediate results you want to display but that would be a waste on resources. Maybe you could have some map in the RenderView that can be populated from the RenderView to cache the intermediate results with a name and a system can then read out this variable to show them?
Integrate Level Editor on Top of Game Engine
It can be even much simpler than this:
m_pGameView->onPassRendered = [](const RenderPass& pass)
{
if (pass.GetName() == L"DeferredPass")
{
pass.GetRenderTarget(0); // render this target
}
};
So yeah, just a callback that is emitted right after each pass is rendered. If IMGui is just part of the regular render-loop, you can then at this point emit the draw-calls for the IMGui-image to have it contain the render-target data at the point in time. Otherwise you would have to copy the content of the render-target texture to a different texture when the callback happens, which is marginally slower and mroe complicated.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement