“There is no multisample buffer so the value of the implementation-dependent state variables SAMPLES and SAMPLE_BUFFERS are both 0”
Is there any way to get GL_MULTISAMPLE support with FBOs? This comment would seem to indicate no but I wanted to double check? As there is a comment later about “defer this (multisample support) until (shortly) after this extension.”
There is also a vendor-specific NV_multisample_coverage extension if you’re interested in using the CSAA capabilities available on GeForce 8 series and above NVIDIA cards.
Err ya sorry that was a typo… the glBindFramebufferExt call should not have been there.
My problem was actually in my Fragment shader, I was using sampler2D instead of sampler2DMS to access the texture. Once I switched that everything now works fine.
Could someone please post some complete code that uses TexImage2DMultisample on a fbo? I’m currently using glRenderbufferStorageMultisample and blitting which works… for the most part whenever i try to use rgba16f as a pixelformat and also multisample i get random white and black pixels on the multisampled areas. It works fine with rgba8 but thats not what i want so i’m looking for an alternative and this looks like it fits the bill.
Do i have to call glTexImage2D or just glTexImage2DMultisample?
Do i have to do anything else when binding or unbinding my FBO(like blitting). How do i access this texture in the shader?
Haven’t done it, but access it via a sampler2DMS uniform (or sampler2DMSArray, if you use a multisampled texture array). See the GLSL spec for details.
Do i have to call glTexImage2D or just glTexImage2DMultisample?
If you want a multisampled (MSAA) target, the latter I’d expect (or use glRenderbufferStorageMultisample to allocate a MSAA renderbuffer – however since you want to feed the result back into a shader as a multisampled target, you want an MSAA texture).
Try allocating a GL_R32F pixel format. See if you get artifacts with that.