Wich is a reasonable GL version that have support for vertex textures fetchs(VTF) in OpenGL ? (for example GL 3.0, 3.1, 3.3) What textures formats should I expect to be supported in average video cards when doing such vertex fetch.

Is that possible with GL ES 2?


1 Answer 1


It is technically possible with OpenGL ES 2 but almost no device currently support it. You'll have to check GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS on devices.

For small "textures" you can use a small array of uniforms.

A lot of (old) desktop video cards still in use only supports GL_LUMINANCE32F_ARB and GL_RGBA32F_ARB or don't support any VTF at all.

If you are going to need large table lookups to generate vertices on OpenGLES I recommend doing it on the CPU directly using multiple vertex buffer objects:

  • One for the static data.
  • One for that data that needs to be updated by the CPU frequently.

This will minimize memory transfers.

With proper code CPUs on mobile are generally fast enough and in some cases faster than the GPU to process complex vertex shaders. Using the GPU is generally better because it runs in parallel while the CPU is doing other things but if the CPU is idle anyway then there's no loss and can gain by better balancing the CPU<->GPU loads.

Some examples can be found on Apple's dev site (https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html) or just google.

  • \$\begingroup\$ thanks, I was fearing something similiar, that's a pity especially because I can't do displacement mapping with a render target :/. well I can but using only 128bit texture and that will not be supported widely :( \$\endgroup\$ Jan 10, 2015 at 23:50
  • \$\begingroup\$ It depends what your minimum desktop GPU is for your project, your target market. \$\endgroup\$ Jan 12, 2015 at 4:55
  • \$\begingroup\$ well, the market that include my 5 years old laptop :D. I have Gl 3.X just thanks to driver upgrades (else it was Gl 2.1). \$\endgroup\$ Jan 12, 2015 at 10:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .