views:

693

answers:

1

I've been trying to figure out how to use float textures in GLES2. The API Reference (http://www.khronos.org/opengles/sdk/docs/man/glTexImage2D.xml) says that only unsigned bytes and shorts can be used, but i've seen people saying it is supported elsewhere.

I could use GL_LUMINANCE as the texture format but that only gets me one float value.

If anyone has some insight i'd appreciate it.

+3  A: 

In OpenGL ES 2.0, floating-point textures are only supported if the implementation exports the OES_texture_float extension. Note that this extension only allows nearest filtering within a texture level, and no filtering between texture levels. This restriction is loosened by the presence of OES_texture_float_linear. Another potential caveat is that the presence of OES_texture_float does not require that the implementation support rendering to floating-point textures with framebuffer objects.

What are you trying to do with float textures?

Pivot
I'm storing some position information. So there would be a fragment shader that does some calculations (particle motion) and renders to a framebuffer which is fed into another shader (render). The thing is, i need float precision.
notlion