FBOs and textures other that RGBA

In a deferred project of mine Im trying to store the normals of the scene in a texture. Everything works alright with the classic RGBA texture but the precision is horrible. 8bits per normal coordinate is not enough.

I’ve tried to create a GL_RGBA_FLOAT32_ATI texture but the FBO wont attach it. What should I change in the following code to be able to write in higher precision textures?

Here is the code for the FBO:
[b]glGenFramebuffersEXT( 1, &fbo_id );
glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, fbo_id );

// create the texture
glGenTextures( 1, &norm_txtr_id );
glBindTexture( GL_TEXTURE_2D, norm_txtr_id );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, window_width, window_height, 0, GL_RGBA, GL_FLOAT, NULL );

// attach the buffers to the FBO
glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, render_targets[RT_NORMAL].norm_txtr_id, 0 );[/b]

PS: Im using Ubuntu and I have, unfortunately, an ATI 4870

Make sure all your color attachments use same internal format. ATI doesn’t support different type attachements for FBO.

Thanks very much! That did it!

I suggest that since your project is deferred you check back for current solutions at the time they become necessary.

English in not my mother language so Im not sure I understand what do you mean.

It was just a silly joke about your project being deferred as opposed to the shading (deferred just means postponed, delayed). I’m not making fun of your English, which is anyway very good.

Hehe now I got it. I’ve made a few mistakes in my initial post and it seems I cannot edit it. Anyway