I have a program that is using FBO to set up a floating point frame buffer. I am using a 6800 GT with 76.91 beta drivers. This is the setup code:
glGenFramebuffersEXT( 1, &mSceneData.mFrontBuffer );
glGenTextures( 1, &mSceneData.mFrontBufferTexture );
glGenRenderbuffersEXT( 1, &mSceneData.mDepthBuffer );
glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, mSceneData.mFrontBuffer );
glBindTexture( GL_TEXTURE_2D, mSceneData.mFrontBufferTexture );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, mSizeX, mSizeY, 0, GL_RGBA, GL_FLOAT, NULL );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, mSceneData.mFrontBufferTexture, 0 );
glBindRenderbufferEXT( GL_RENDERBUFFER_EXT, mSceneData.mDepthBuffer );
glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, mSizeX, mSizeY );
glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, mSceneData.mDepthBuffer );
I render into this buffer using a GLSL fragment shader, then using this buffer as a texture, I render it into the main frame buffer, also using a GLSL fragment shader. Problem is even though I have used glClampColorARB( GL_CLAMP_FRAGMENT_COLOR_ARB, FALSE ) everywhere I think it might be appropiate to do it, I can’t seem to get unclamped values. I don’t know if its getting clamped when getting written to the frame buffer object, or if it is getting clamped when I try to read it for the final rendering. Also tried glClampColorARB( GL_CLAMP_READ_COLOR_ARB, FALSE ) just in case but that had no effect either.
Anyone with an idea what the problem might be?