OpenGL ES 2.0 post processing tips

I was trying to get the ofxPostProcessing to run on iOS and finally got one of the shaders working (the bloom one). To save others the trouble I am posting some important findings here.

  1. If you use setupShaderFromFile or setupShaderFromSource you MUST remember to call bindDefaults() after or your shader attributes won’t work (no texcoords etc.)

  2. You can render a full screen quad using an ofMesh or converting an ofMesh to an ofVbo.

  3. If you are having trouble with your vertex or fragment shaders, look in ofGLProgrammableRenderer.cpp because it has default vertex and fragment shaders in there that work.

  4. Your shader CAN compile without errors and still not work, in which case I recommend checking that your attributes are bound and you are calling setUniformTexture to bind any textures to your shader.

If I have time I will create a pull request with the opengl es changes.

2 Likes

Did you get a chance to do a pull request with OpenGL ES changes and stuff ?
Thanks :slight_smile: