Quartz Composer's default vertex shader uses gl_TexCoord[0]
to pass the texture coordinate from the vertex shader to the fragment shader.
So, in the fragment shader, you could remove varying vec2 surfacePosition;
, and in line 16, replace surfacePosition
with gl_TexCoord[0].xy-0.5
.