Hi,
I am using shader to generate pictures. I would like to use a sampler2DRect array in my shader.
I don’t know how to set that array in openframeworks, so the shader could grab them. How is the correct way to do it? I have tried different options with no success
Some code:
quad.frag
uniform sampler2DRect quadTexture;
uniform sampler2DRect images[12];
ofApp
void ofApp::draw(){
shader.begin();
ofParameterGroup params1;
params1.setName("images");
for(int i = 0; i < imagesTextures.size(); i++){
ofParameter<ofTexture> textures_params("images", imagesTextures.at(i));
params1.add(textures_params);
}
shader.setUniforms(params1);
quadFbo.draw(0,0);
shder.end();
}
Any help would be appreciated