// Deform the geometry with a sine depending on the uniform time. uniform float time=0.0; void main() { gl_FrontColor = gl_Color*mod(time/5000.0,1.0); // Do some funny deformations vec4 v = vec4(gl_Vertex); v.y = v.y*(sin(time/1000.0)+1.0); gl_Position = gl_ModelViewProjectionMatrix * v; }