attribute vec3 position; attribute vec2 texcoord; uniform mat4 modelViewProjectionMatrix; varying vec2 fragTexCoord; void main() { fragTexCoord = vec2(texcoord.x, 1.0 - texcoord.y); gl_Position = modelViewProjectionMatrix * vec4(position, 1.0); } #ifdef GL_ES precision highp float; #endif uniform sampler2D tex; varying vec2 fragTexCoord; void main() { gl_FragColor = texture2D(tex, fragTexCoord); }