MSAA doesn't support integer texture?

Hi guys,

When I try to create FBO with integer texture and msaa, it reports GL_FRAMEBUFFER_UNSUPPORTED. But it succeeds without msaa. Anybody knows why?


OpenGL Renderer		: GeForce 8800 GTS 512/PCI/SSE2
OpenGL Vendor		: NVIDIA Corporation
OpenGL Version		: 3.1.0
OpenGL Shader Version	: 1.40 NVIDIA via Cg compiler

FBO texture format:

internalformat = GL_RG16I;
format = GL_RG_INTEGER;
type = GL_INT;

Is this supposed to work from the spec? I mean, would it then interpolate fragments at edges, just like float textures?

The question is, what good is this? Integer textures are mostly used to store IDs and such, wouldn’t they break under multi-sampling ?


Check the value of GL_MAX_INTEGER_SAMPLES. Your multisample texture creation might be failing.

Yes, I’d like to store ID in GBuffer pass, like this:

RT0: RG16F(normal.xy)
RT1: RG16I(id)

For example, the inferred lighting wants objectID and normalGroupID to be stored.