# Processing through multiple shaders (LWJGL/Java/OpenGL)

Very simple question: Is it possible to process a vbo through different shaders? If so, how? What I want is sth like this:

reflectionShader.bind(); //starts shader
process(vbo); //"renders" vbo using bound shader
process(vbo);
render(vbo); //output to screen

• I don't think most systems support that as a single batch if that's your intention. Maybe if your broaden your explanation of what you hope to acheive, someone can help you find another alternative. Aug 7, 2015 at 12:58

The way to do this is with a FBO (Frame Buffer Object).

You can render each pass to a FBO and use it as a texture input in the next stage, any kind of deferred shading and post processing is reliant upon this functionality.

https://www.opengl.org/wiki/Framebuffer_Object

• So by that you mean rendering it x times and putting the results on top of each other? That should work. I wont mark your answer as correct yet, because mb theres a better solution to this than using fbos :-) Aug 7, 2015 at 13:46
• Unfortunately your only options in OpenGL are either to use a texture, a uniform or shader storage buffer (which may be a texture in the implementation anyway). For your case, where you need to draw the entire screen using a technique and feed it as the input into the next technique, I don't think there's much you can do other than use an FBO. Aug 7, 2015 at 14:37