I'm trying to achieve the following task:
- I've a grid (plan) of NxM points
- I've a texture which each pixel represents a force field for a position X,Y
- I would like to iteratively update the initial grid using the force field texture (and a shader)
I guess we might quite easily do this using a "geometry shader" however those are not present in WebGL. Therefore, how could I use a GLSL driven program in order to update the position of the vertexes in my grid ? As I understood, a regular vertex shader do transform the source to something else in one pass, now is there a way to feed this output back in the shader during the next iteration ?
[edit] A possible way I can see right now could be to use a fragment shader which result could then be stored in a texture that I might reinject in the next step.