Hi,
no, the varying passes a value from the vertex shader to its correspondent fragment shader.
Using varyings you can pass whatever you want between the vert and frag shader.
As of the surfacePosition, out of a quick look at it in glslsandbox, it just seems to contains the screen coordinates for each vertex. There might be also some issues whether it is using normalized or not values.
If you want to use glslsandbox shaders right away with OF, you should try @patricio 's superb ofxFX addon. https://github.com/patriciogonzalezvivo/ofxFX
Best
↧
Varying vec2 surfacePosition
↧