0
votes

I'm implementing an HDR rendering pipeline in an Android app using OpenGL ES 2.0 and I'm having some issues with floating-point textures, neither GL_FLOAT or GL_HALF_FLOAT_OES works as the texture type, as this will give GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT when the texture is used as a framebuffer target.

The code works perfectly if i set type to GL_UNSIGNED_BYTE so it really only is the floating-point issue that's causing it.

The device supports the extensions GL_OES_texture_float, GL_OES_texture_half_float, GL_EXT_color_buffer_float and GL_EXT_color_buffer_half_float.

I'm using GL_NEAREST as the GL_TEXTURE_MAG_FILTER/GL_TEXTURE_MIN_FILTER, but the device does support GL_OES_texture_half_float_linear so GL_LINEAR should work as well.

The device does support npot textures, but even with a power of 2 it still fails.

Thanks!

1
Did you try a RGBA texture or RGB texture ? I found out that Adreno 320 doesn't like RGB16F (despite both being standard in GLES3) so only RGBA16F works :| - RelativeGames
Yes i did, so when you're using RGBA16F that is with an OpenGL ES 3.0 context? In that case sweet, I guess i'll just update to Android 4.3 :) - Johan
I thought you might have the S4 with the PowerVR, but yes this is on GLES3 and Nexus 4. - RelativeGames

1 Answers

1
votes

Are you sure the extension GL_EXT_color_buffer_half_float is exposed in your device?

According to this question at Imagination forums, the S4 supports the extension but it can't be used.

[..] GL_OES_texture_float allows an application to use floating point textures. You would need an additional extension to render to a floating point target (e.g. EXT_color_buffer_half_float). Unfortunately, this extension is not exposed on the PowerVR Galaxy S 4.