I'm trying to do image processing using shaders in GLSL for good performances and portability.
But I have multiple steps to transform the image and each step need the information of the previous step.
For example, I want to blur the image so I need the informations of the pixels surrounding each one to average them, that is not a problem, I just use texture2D(u_texture, v_texCoords);
and after the processing I have a vec4 blurred
Then, after the blur, I want to do an edge detection on the image previously blurred, but I can't do it using vec4 blurred
because it does not give me access to the surrounding pixels. And if I use texture2D(u_texture, v_texCoords);
again, I do the process on the first image and not on the blurred image.
In other worlds, after each step of image processing I want to have access to all the pixels of the previous step.
(I am using java with libgdx and shaders in GLSL)
Thank you.