I have been converting a few shaders I’ve built in Jitter and have come to this issue a couple times. Two questions:
How do I handle multiple texture coordinates in oF? I understand how to pass in the textures:
lumaDrag.setUniformTexture("tex0", compFbo.getTexture(), 0);
lumaDrag.setUniformTexture("tex1", compFbo.getTexture(), 1);
but I don’t know how to access the coordinates of the two independently (texcoord0 and texcoord1). I just don’t know what I have to put in my vert shader to do this.
Finally, how can I take the result from the shader and immediately send it back in as my second texture? In Jitter I would pass the result into a slab, and immediately into the second input of the shader object.
Any help is appreciated!
EDIT: Okay, so I appear to have my first question solved, or at least I hope so. My vert shader now looks like this:
#version 150
uniform mat4 projectionMatrix;
uniform mat4 modelViewMatrix;
uniform mat4 modelViewProjectionMatrix;
in vec4 position[2];
in vec2 texcoord[2];
out vec2 texcoord0, texcoord1;
void main(){
texcoord0 = texcoord[0];
texcoord1 = texcoord[1];
gl_Position = modelViewProjectionMatrix * position[0];
}
I’m not throwing errors at least…
The feedback doesn’t seem to be working. I created a second fbo for the feedback, but it appears something is out of order. Below is my ofApp.cpp: