I'm getting some artifacts when I try to use a colour attachment on an FBO. I'm saving my first pass as a texture, then passing it as an input to an anti-aliasing shader. The result is, as below, some weird noise and an enforced black background. The AA is applied fine.
GL.BindFramebuffer(FramebufferTarget.FramebufferExt, _hndFBO); GL.BindTexture(TextureTarget.Texture2D, 0); GL.DrawBuffer((DrawBufferMode) FramebufferAttachment.ColorAttachment0Ext); GL.PushAttrib(AttribMask.ViewportBit); GL.Viewport(0, 0, _intWidth, _intHeight); //Do rendering here GL.PopAttrib(); GL.BindFramebuffer(FramebufferTarget.FramebufferExt, 0); GL.DrawBuffer(DrawBufferMode.Back);
Any ideas? Need more code?