Determining supported color attachment types for FBOs?

Is it possible to somehow acquire a list or a document detailing what color attachment texture formats are available on various GPUs for FBOs? I’m using a Quadro FX 3000, and I’d like to have an FBO that has just a single color buffer attachment that is a two channel, floating-point rectangular texture. Everything I’ve tried so far tells me that this FBO configuration I want is unsupported!

I’m only using RGB and RGBA render targets. LUMINANCE and LUMINANCE_ALPHA were not supported on GeForce 6600 and 7800.
I guess that this is because gl always render using at least 3 components and current GPU’s do not supprt converting RGB to LUMINANCE before writting data into framebuffer.
Of course GPU could just store red componend and ignore green and blue, but that wouldn’t be correct.

The framebuffer object extension does not yet support rendering to one and two channel buffers.

Well, then, that would probably be why it’s not properly working. I’ll just use a 3 channel floating point texture, maybe I can figure out something else to output so that the last channel doesn’t go to waste.

Thanks!

I you don’t know what to do with the extra channel, you can still encode one of your data items into two channels for increased precision :wink:

Or if you’re really desperate for memory, you can use a four-channel texture with half the size.

Of coures, both these suggestions cost a little more computation when rendering into and reading out of the texture, so if you have the memory and don’t need the precision, you may as well just leave the extra channel empty.

I’m now trying to use a three-component, RGB floating point texture, and I’m running into the same issue; the FBO is unsupported!

This is the code I’m using to create the FBO:

glGenFramebuffersEXT(1, &r_depthblur_fbo);
glGenTextures (1, &r_fbo_depthblur_tex);

glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, r_depthblur_fbo);
glBindTexture(GL_TEXTURE_RECTANGLE_EXT, r_fbo_depthblur_tex);
glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_FLOAT_RGB_NV, glConfig.vidWidth, glConfig.vidHeight, 0, GL_RGB, GL_FLOAT, NULL);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_EXT, r_fbo_depthblur_tex, 0);

And still it is unsupported! I’ve also tried using GL_FLOAT_RGB16_NV, and it also does not work.

Does anyone have any idea why this is not working? I’m on a Quadro FX 3000, so it SHOULD be supported, right?

FBOs might support R and RG textures in an upcoming ARB extension. Some info here:
http://www.gamedev.net/columns/events/gdc2006/article.asp?id=233

They are working on an ARB_framebuffer_object, which will merge (with some changes) EXT_framebuffer_object, EXT_framebuffer_multisample, and EXT_framebuffer_blit. EXT_packed_depth_stencil will remain a separate extension. Mixed size and format attachments will be allowed, and R and RG formats will be added (L, and LA may be added as well). ARB_fbo_simple, EXT_framebuffer_format, and EXT_immutable_objects are some extensions that have been proposed to address format compatability, but nothing has been decided yet.

Originally posted by PfhorSlayer:
[b] I’m now trying to use a three-component, RGB floating point texture, and I’m running into the same issue; the FBO is unsupported!

This is the code I’m using to create the FBO:

glGenFramebuffersEXT(1, &r_depthblur_fbo);
glGenTextures (1, &r_fbo_depthblur_tex);

glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, r_depthblur_fbo);
glBindTexture(GL_TEXTURE_RECTANGLE_EXT, r_fbo_depthblur_tex);
glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_FLOAT_RGB_NV, glConfig.vidWidth, glConfig.vidHeight, 0, GL_RGB, GL_FLOAT, NULL);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_EXT, r_fbo_depthblur_tex, 0);

And still it is unsupported!  I've also tried using GL_FLOAT_RGB16_NV, and it also does not work.

Does anyone have any idea why this is not working? I’m on a Quadro FX 3000, so it SHOULD be supported, right? [/b]
The Quadro FX 3000 is a NV30 part right? I am not sure if they support floating point textures.

Do you see GL_ARB_texture_float or GL_ATI_texture_float in the extension string?

Hrmm, you’re right. I guess I could use an RGBA texture and encode the floating point value in that…

It would have been great if EXT_packed_depth_stencil joins the same extension. Maybe for the ARB version ?

The Quadro FX 3000 is a NV30 part right? I am not sure if they support floating point textures.
NV30 GPUs support the GL_NV_float_buffer extension.

I’ve also tried using GL_FLOAT_RGB16_NV, and it also does not work.
The format parameter of glTexImage2D should always be GL_RGBA when using one of the GL_FLOAT_*_NV types from the GL_NV_float_buffer extension.

Also, make sure the float texture does not have filtering enabled (you must use GL_NEAREST instead).