I suggest to first read andres' blog posts about shaders in Processing. And then check out the examples that come with Processing. One problem is that you have 4 uniforms in the shader but you're not setting two of them in your sketch (slide_up, tex1). Another problem is related to the different type of shaders that are recognised by their variables in Processing, see the blog posts. Another problem is the typo in your endif. Another problem is that this shader expects two texture coordinates coming from the vertex shader and you're not setting any in your program or even have a vertex shader. So all in all you're a long way from home. Which comes back to my first suggestions to read up and start with the examples.
↧