Skip to content

Instantly share code, notes, and snippets.

@iondune
Forked from anonymous/QuadCopy.frag
Last active August 29, 2015 14:02
Show Gist options
  • Save iondune/c7c57222666c8cb78bf9 to your computer and use it in GitHub Desktop.
Save iondune/c7c57222666c8cb78bf9 to your computer and use it in GitHub Desktop.
uniform sampler2D uTexColor;
varying vec2 vTexCoord;
void main()
{
gl_FragColor = texture2D(uTexColor, vTexCoord);
}
attribute vec2 aPosition;
varying vec2 vTexCoord;
void main()
{
gl_Position = vec4(aPosition, 0, 1);
vTexCoord = (aPosition + vec2(1.0)) / 2.0;
}
GLfloat QuadVertices[] =
{
-1.0, -1.0,
1.0, -1.0,
1.0, 1.0,
-1.0, 1.0
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment