View Full Version : Render to L16F & LA16F texture using FBO on ATI
05-29-2006, 03:05 PM
I've encountered problems with this formats on my Radeon9800pro card.
In D3D it is possible to render to R16F and RG16F format render targets. The analog in OGL seems to be INTENSITY_FLOAT16_ATI & LUMINANCE_ALPHA_FLOAT16_ATI texture formats.
But when I attach this type of texture to FBO, I get GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT error.
Is this an driver problem, or I'm forgetting something?
05-29-2006, 03:17 PM
Single and double channel render targets are currently not supported in OpenGL via FBO. This is an unfortunate weakness in the current spec. NVidia have support for some of them via GL_NV_float_buffer, but that requires the using a texture rectangle (integer texture addressing). I've heard that the ARB is working to fix this limitation. Anyone associated w/ GL care to verify?
I cannot understand why it's so long to support those formats with the current extension. I think the extension is fine, they just need to implement rendering to those formats.
05-30-2006, 09:57 AM
In ATI cards, GL_TEXTURE_2D with GL_RGBA_FLOAT16_ATI or GL_RGBA_FLOAT32_ATI may be used, it should be attached to FBO, see the next code:
// initialize textures
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA_FLOAT32_ATI, vImageWidth, vImageHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
// bind the FBO to attach the textures
// attach the color buffer 0
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, tex[i], 0);
NOTE: It does not work as NV_TEXTURE_RECTANGLE, but on OpenGL 2.0 NPOT textures are supported. Then in this case, NV_TEXTURE_RECTANGLE can be replaced by some MxM texture. For more information see the next reference
05-30-2006, 04:53 PM
We have single and dual channel support working. You should have this in public driver within a few months.
06-04-2006, 04:49 AM
This won't help me.
See post #1
Good, but it will be too late for me
06-07-2006, 10:23 AM
While we are on the ATI subject :)
When are they going to support PBOs!
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.