I'm trying to do a simple blur shader for glow, and I've run into a snag. I render anything emissive to a texture, and that works fine. Then, I send that texture into my shader and render it to a fullscreen quad while that same rendered texture's FBO is active. In other words, I'm writing to what is currently being read to the shader.
The issue I run into is that it seems to blend the old fragments with the new ones. For example, if I have an object rendered a pure-white object to the texture, and then use my texture to overwrite that texture to pure-black and no alpha (gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);), the pixels from original color will show through. Now, if I change the alpha in gl_FragColor to 0.5, it blends the pure-white pixels from the first render with the pure-black pixels giving me gray...
Should I be using two FBOs, and be ping-ponging back and forth?