   Copying FBO attached texture to a smaller FBO
  Hi board,I'm trying to implement (parts of) the depth of field effect as described in the StarCraft II paper (link) and currently I've implemented something along the lines of it; however there's one part I can't get to work. The paper talks about downscaling the framebuffer to do some of the blurring effects on a texture 1/4th the size.However, every time I try to copy the content of the framebuffer to a smaller texture using glBlitFramebufferEXT I get a black texture. However, if the dimensions of the source and destination FBO are the same, the copy succeeds. This doesn't seem to be an glBlitFramebufferEXT issue, however, because when I copy the texture manually using a fullscreen quad that I render to the destination FBO, I get the same results.Here's the code I use to copy one FBO to another:// somehow this only works if m_Width == other.GetWidth() && m_Height == other.GetHeight()void FrameBufferObject::RenderToOtherFBO(FrameBufferObject &other, GLbitfield mask){glPushAttrib(GL_ALL_ATTRIB_BITS);glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_fboId[0]);glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, other.m_fboId[0]);glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);glBlitFramebuffer(0, 0, m_Width, m_Height, 0, 0, other.GetWidth(), other.GetHeight(), mask, GL_LINEAR); // GL_NEAREST doesn't make a differenceglBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);glPopAttrib();}The source FBO is constructed with two textures and a depth buffer attached, the destination FBO just has two textures attached. When the texture's internalFormat is GL_RGBA the result is a black texture; however my usecase needs GL_RGBA32F_ARB textures because of HDR rendering. If I use those, the result is an ugly yellowish texture.I'm testing this on a GeForce 8M series card, do you guys have any suggestions regarding the problems I'm having?Thanks.   
Quote:Original post by JasperBekkersThis doesn't seem to be an glBlitFramebufferEXT issue, however, because when I copy the texture manually using a fullscreen quad that I render to the destination FBO, I get the same results.I didn't worked with BlitFramebuffer, but I downscale the framebuffers by the fullscreen quad method. If it seems that glBlitFramebuffer is not the issue, I would try to debug the problem by your fullscreen quad render method.Write an simple copy shader which copies the previous framebuffer AND sets the output red channel to 1. When you get a black screen you have a problem displaying your buffers correctly. If you just see a red screen, you have a framebuffer setup problem. If you see the previous framebuffer and the red channel, you can go on and try to debug you BlitFramebuffer setup.;  After debugging this application for quite some time, I determined that the problem is that I'm attaching two color buffers to each FBO. Does this mean I only need to set the glDrawBuffer / glReadBuffer correctly, or do I need to undergo some other steps as well?Edit:Yes, that was the only thing required. I hate debugging when I'm looking completely in the wrong direction. Thanks, Ashaman73.   