PDA

View Full Version : Clamping in RGBA32F FBOs



rexguo
04-28-2009, 12:53 AM
(This is on MacOSX)

On my 8600M, it seems like the values in my floating-point FBOs
are being clamped (I want them unclamped), both in fixed and
shader pipelines. As verification, I read back the buffers and
checked their values and those that are meant to be >1.0 are
stuck at 1.0. (I do use RGBA32F internal textures)

This list entry also contradicts my experience, saying you can
get unclamped behaviour (which is the default for FP32) on a
8600M:
http://lists.apple.com/archives/mac-opengl/2009/Mar/msg00044.html

As a side question, isn't glClampColorARB supposed to be part of
OpenGL 2.0? Why isn't it implemented on OSX then?

Lastly, I quote the specs from:
http://oss.sgi.com/projects/ogl-sample/registry/ARB/color_buffer_float.txt

3. How does the clamping control affect the blending equation?

RESOLVED: For fixed-point color buffers, the inputs and the
result of the blending equation are clamped. For
floating-point color buffers, no clamping occurs.

TIA!

fredrum
04-28-2009, 12:09 PM
Hi,
I'm struggling to get my FBO to return >1.0 values.
What do I have to do to make it work?


cheers
fred

fredrum
04-28-2009, 12:24 PM
Hi again,
please don't reply I got it working!

thanks
fred

Dark Photon
04-28-2009, 06:27 PM
please don't reply I got it working!
So what was the problem? It looked like you were doing everything right.

fredrum
04-29-2009, 06:31 AM
See my other thread here "Read 2D texture pixel values".

Basically, after getting the FBO to work I mistakenly did,


glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, mouseX, mouseY, 1, 1, 0);

instead of


glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB32F_ARB, mouseX, mouseY, 1, 1, 0);


cheers
fred