There seems to be nothing wrong with the use of the varying vec2. Yet besides that I'm not sure about what all that math is going to do (I didn't analyze it), in which might be a problem. the biggest problem I see is that ofRect doesn't generate texCoords so I would start by using something that does, like an ofMesh or passing them manually to openGL.
Best
↧
Varying vec2 surfacePosition
↧