Question about Deferred Shading implementation

i have an implementation question about deferred shading…
i saw some examples, and they first create a FBO and then render diffuse/specular/normal etc to them… but then at the time of light rendering, they just use the FBO textures as sampler and render the final pixels to the system framebuffer…

but, if i want to do something like HDR , conditional/pre stencil to the lights, or use postprocessing that needs say, the zbuffer… i need to keep all into the FBO (as in, final compositing in another color attachment i guess?) so… do i just run using all the colorbuffers attached and do everything like nothing? I’m not very sure on whats the correct/most performant way to do it…

Thanks!

Maybe it is me but your question is not very clear… Can you elaborate a bit more?
What is the problem with the depth buffer? I mean, you can retrieve it in a color attachment using MRT, or just read it from the fbo depth attachment which could be a texture.

My suggestion is that you render all the lights and such into a separate FBO color buffer(RGBA_32F), from there you can do most post processing when rendering out to the backbuffer.