How to send texture to separate shaders

Hi everyone! Please forgive me if this question has been answered elsewhere on this forum. I did not find any answer that works for me.

Info: I’m using GLSL Version 1.20.

A quick description of my problem: I have two shaders to do two different processes and I’m trying to send two different textures respectively.

For the first shader, I draw it in an fbo.

fbo.begin();
shader.begin();
shader.setUniformTexture("src", src.getTexture(), 0); 
//another fbo for drawing
shader.end();
fbo.end();

With this code, if I do fbo.draw(0,0), I will be able to see the original shader’s effect. Now I want to use another shader (for blurring, for example) and I do this:

shader2.begin();
shader2.setUniformTexture("src",fbo.getTexture(), 0);
ofDrawRectangle(0,0,ofGetWidth(),ofGetHeight());
shader2.end();

When I do this, I get a completely white screen. However, there are no errors thrown anywhere. I’ve had success before when sending multiple textures to a single shader, but none to multiple shaders.

If anyone can help me understand what I’m doing wrong, I’ll be very thankful! I think my understanding of how textures are bound, etc, is not yet complete. Thanks!

if you have two different textures you should do this for each one :

//for the first texture
fbo.begin();
shader.begin();
shader.setUniformTexture("src", src.getTexture(), 0); 
//another fbo for drawing
shader.end();
fbo.end();
// for the second texture
shader2.begin();
shader2.setUniformTexture("src",fbo.getTexture(), 1);
ofDrawRectangle(0,0,ofGetWidth(),ofGetHeight());
shader2.end();

Thanks! I tried this too. Is there something I should change in the vertex shader?

For the first shader I have this line:

gl_TexCoord[0] = gl_MultiTexCoord0

Does this stay the same for the second vertex shader too?