1attribute vec3 position; 2 3uniform mat4 ModelViewProjectionMatrix; 4 5// Removing this varying causes an inexplicable performance regression 6// with r600g... Keeping it for now. 7varying vec4 dummy; 8 9float process(float d) 10{ 11 $PROCESS$ 12 return d; 13} 14 15void main(void) 16{ 17 dummy = vec4(1.0); 18 19 float d = fract(position.x); 20 21 $MAIN$ 22 23 vec4 pos = vec4(position.x, 24 position.y + 0.1 * d * fract(position.x), 25 position.z, 1.0); 26 27 // Transform the position to clip coordinates 28 gl_Position = ModelViewProjectionMatrix * pos; 29} 30 31