Created
June 1, 2014 00:04
-
-
Save anonymous/07ec0c6e5c0410e6c663 to your computer and use it in GitHub Desktop.
Screen rendering!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uniform sampler2D uTexColor; | |
varying vec2 vTexCoord; | |
void main() | |
{ | |
gl_FragColor = texture2D(uTexColor, vec2(vTexCoord)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attribute vec2 aPosition; | |
varying vec2 vTexCoord; | |
void main() | |
{ | |
gl_Position = vec4(aPosition, 0, 1); | |
vTexCoord = (aPosition + vec2(1.0)) / 2.0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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