PDA

View Full Version : Blending and clamping



Kopelrativ
08-26-2012, 12:35 PM
According to glBlendFunc (http://www.opengl.org/wiki/GLAPI/glBlendFunc) all scale factors have the range [0,1] and according to glBlendEquation (http://www.opengl.org/wiki/GLAPI/glBlendEquation) all values are clamped to [0,1].

I can understand this if the image format is GL_RGBA8, but not if it is a floating point format. Have I understood this correctly?

If so, what is the reason?

It makes it harder if you want to do HDR imaging.

Alfonse Reinheart
08-26-2012, 01:04 PM
Don't blame me; that's how the man pages have always described it.

Those descriptions are inaccurate. The clamping behavior only exists when writing to non-float-point or non-integral targets. And division by whatever also only matters when dealing with fixed-function.

In short, they do what you think they do, not what they say. Feel free to update the pages; that's why they're on the Wiki.

Kopelrativ
08-27-2012, 01:16 AM
Thanks for the confirmation, I updated the Wiki.