Last active
August 29, 2015 13:58
-
-
Save peterhellberg/10428290 to your computer and use it in GitHub Desktop.
Experimenting with GLSL
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 tex; | |
void main(){ | |
gl_FragColor = texture2D(tex, gl_TexCoord[0].xy); | |
} |
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 float time; | |
void main(){ | |
vec4 vertex = gl_Vertex; | |
vertex.z = sin(vertex.y * 0.2 * time * 5.0) * 0.25; | |
gl_TexCoord[0] = gl_MultiTexCoord0; | |
gl_Position = gl_ModelViewProjectionMatrix * vertex; | |
} |
Author
peterhellberg
commented
Apr 10, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment