View Full Version : FP target and MAX blending

05-28-2010, 07:36 AM
Hi all !
I'm trying to implement a basic version of "Efficient Depth peeling via bucket Sort" (HPG 2009). So I use MRT, 32-bit floating point target and MAX blending, but it's not working :(

According to OpenGL doc of glBlendEquation(): "For these equations all color components are understood to have values in the range [0..1] .... The results of these equations are clamped to the range [0..1]" so that means I can't use floating point target with GL_MAX blending ?

Does anyone know the extension (or another way) to bypass this limitation ?


Alfonse Reinheart
05-28-2010, 11:00 AM
According to OpenGL doc of glBlendEquation():

According to the OpenGL 3.2 specification:

If the color buffer is fixed-point, the components of the source and destination values and blend factors are clamped to [0; 1] prior to evaluating the blend equation. If the color buffer is floating-point, no clamping occurs.

06-10-2010, 06:23 AM
I've switched to GL_RGBA32UI_EXT because I need to pack 3 different values in 1. But I still can't get this MAX blending work :'(
I anyone have already done stuff like that before ?
I need help

06-10-2010, 09:02 AM
Ok I've finally made it: actually MAX blending only work with values clamped to [0..1] so I switched back to GL_RGBA32F format and divide my packed value by 256^3