A 3D texture slice can be directly attached to the current framebuffer. So, create a frame buffer, a three-dimensional texture, and then render, for example:
glFramebufferTexture3D( GL_FRAMEBUFFER, Attachment, GL_TEXTURE_3D, TextureID, 0, ZSlice ); ...render to the slice of 3D texture...
So, you need only 1 framebuffer, which will be repeated by the number of Z-fragments in your target 3D texture.
source share