check for render-to-float-texture with blending?


How should i check whether render-to-float-texture with alpha blending is supported in hardware?

Currently i check for the extension “GL_EXT_framebuffer_sRGB” since this works for my apps target platforms(Ati X800 and X3850), but i don’t think this is the way it’s meant to be done :stuck_out_tongue:

I render to a FBO with alpha blending, and get minor banding artifacts after post-processing with GL_RGBA8.
When i use GL_RGBA16F_ARB the banding is fixed, but the X800 does not support that.

Any idea what the correct check is?

Thanks for link… will search the wiki next time.

Too bad there is no platform independent way to check it.

So in theory the X800 could do the blending, but not the filtering(for my app the X800 would be too slow then anyhow).

“Too bad there is no platform independent way to check it.”

I don’t think you’ll hear any arguments there - that’s the winner of 7 Razzies, including Worst Picture.

The platform independent way is simple: “try it and see”.

This is the same answer to every “does it work” or “how fast is it” question. When your app starts up, you go through a bunch of initialization, like checking the version and extension strings. During initialization, you can introspect anything else you want, like rendering precision or performance.

It’s unfortunate there isn’t an “ARB_float_blending” string for you to query. But you can still create the float surface you want to use, clear it to black, turn on blending, and draw a half-transparent white quad on it. If you get grey, congratulations, float blending works. Of course, it might have fallen back to software rasterization, so you’ll probably want to benchmark it if you care about it being fast.