Skip to content

Instantly share code, notes, and snippets.

@peterhellberg
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterhellberg/10428290 to your computer and use it in GitHub Desktop.
Save peterhellberg/10428290 to your computer and use it in GitHub Desktop.
Experimenting with GLSL
uniform sampler2D tex;
void main(){
gl_FragColor = texture2D(tex, gl_TexCoord[0].xy);
}
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;
}
@peterhellberg
Copy link
Author

Screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment