🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Integrate Level Editor on Top of Game Engine

Started by
11 comments, last by Juliean 3 years, 10 months ago

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?

Advertisement

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