FBO and single channel float texture with HW blending

i know that single channel textures are not part of FBO spec and they will be in future extension, but they work. my question is, is there any single channel internal format with HW accelerated floating point blening? now, i am using GL_RGB16F_ARB internal format, which runs fine, but it is waste if memory for me.

i tried alpha, intensity an luminance 16-32 bit formats, but with poor performance :frowning:

i have gf 6600gt, 81.85 driver

The only single channel texture formats currently supported on GeForce 6/7 GPUs are the NV_float_buffer texture formats, which do not support blending.

The ARB_texture_float single channel formats won’t be supported until the ARB adds FBO support for 1/2 component texture formats.

don’t anybody know, when it will be?

i implemented even 32bit floating point blending with single channel texture :slight_smile: it is functional and runs at near the same speed as 16bit. but it is not recommended method, because i am reading and writing from-to same texture, which according to spec has undefined behavior, but it runs fine on my gf 6600gt.

How to ?

Could Shell paste some code to here ?

it is simple. just create your texture, attach it to FBO as color attachment. then, when you render, you bind that same texture to any texture unit and in shader, you just lookup the value form the texture with screen coords (gl_FragCoord.xy), do any calculations with it and just output the color.

as the texture you read from, is also the one, you write to (through FBO), you achieve your own blending equation :wink:

results are undefined because, you read/write from/to the same texture and multiple pixels are processed in parallel. but when you don’t rely on any neighbouring texels, it should, on 99%, run ok :slight_smile: