Alex Rivera | Logout

GPGPU programming with OpenGL ES 2.0

Asked 2011-03-01T08:36:16.443
9

I am trying to do some image processing on the GPU, e.g. median, blur, brightness, etc. The general idea is to do something like this framework from GPU Gems 1.

I am able to write the GLSL fragment shader for processing the pixels as I've been trying out different things in an effect designer app.

I am not sure however how I should do the other part of the task. That is, I'd like to be working on the image in image coords and then outputting the result to a texture. I am aware of the gl_FragCoords variable.

As far as I understand it it goes like that: I need to set up a view (an orthographic one maybe?) and a quad in such a way so that the pixel shader would be applied once to each pixel in the image and so that it would be rendering to a texture or something. But how can I achieve that considering there's depth that may make things somewhat awkward to me...

I'd be very grateful if anyone could help me with this rather simple task as I am really frustrated with myself.

UPDATE:

It seems I'll have to use an FBO, getting one like this: glBindFramebuffer(...)

Edit
Report

1 Answer

8

Use this tutorial, it's targeted at OpenGL 2.0, but most features are available in ES 2.0, the only thing i have doubts is floating point textures.

http://www.mathematik.uni-dortmund.de/~goeddeke/gpgpu/tutorial.html

answered 2011-03-01T11:55:14.663

Your Answer