Hello everyone! I finally finished implementing Deferred Shading as well as Deferred Lighting in my engine. I am now to point where I would like to add some Post Processing Effects and was wondering, what is the most efficient way to set this up and allow multiple effects? I was thinking that I'd have something like this: For each effect, set to render to a single target, call the effects Render method, in the effect's Render method, create a copy of the target before clearing, render the effect using the target I copied (the last effects output texture), set to the back buffer, then render the target.
void NXPPBloom::Render(NXRenderTarget& target)
{
//Get the last effect output texture before I clear
NXTexture2D before = target.Texture;
target.Clear(0, 0, 0, 0);
//Bloom code...
}
Do you guys think this will work? Is there a more efficient or easier way to do this? Thanks! :)